List Info

Thread: PERL CGI and system




PERL CGI and system
user name
2006-12-25 10:44:49
I write the next script and test successfully by the client
PERL.
Afterwards I try this script on the web server. But, it
results 
in ;
1. system("commnd ..) makes no output in the IE.
2. system("perl -v >..)   makes no file outoput on
the web server.

#!/usr/local/bin/perl
print "Content-type: text/htmlnn<br>";
system("command /c dir");
system("perl -v >
c:\inetpub\wwwroot\pc_sale\cgi-bin\log");
print "END";
exit(1);

PLS advise me the correct way!
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Weblistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
PERL CGI and system
user name
2006-12-25 19:12:11
hajimu.takahashisb06unisys.co.jp wrote:

> I write the next script and test successfully by the
client PERL.
> Afterwards I try this script on the web server. But, it
results 
> in ;
> 1. system("commnd ..) makes no output in the IE.
> 2. system("perl -v >..)   makes no file outoput
on the web server.
> 
> #!/usr/local/bin/perl
> print "Content-type:
text/htmlnn<br>";
> system("command /c dir");
> system("perl -v >
c:\inetpub\wwwroot\pc_sale\cgi-bin\log");
> print "END";
> exit(1);
> 
> PLS advise me the correct way!

This works for me on XP with Apache server:

#!/usr/bin/perl --

# use appropriate path above to your perl if on Apache

print "Content-type: text/plainnn";

system "cmd /c dir";		# cmd rather than command
for XP
system "/usr/bin/perl -v";	# to browser
system "/usr/bin/perl -v > E:\tmp\cgi.log"; #
to file

What browser, what OS and what webserver are you using ?
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Weblistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )