in reply to Newbie cgi question

Your script runs as a different user when it is executed via the Web Browser. That is why you may notice Net::Ping functionality work when you test it from the console, but not from the Web Browser. This is *part* of the problem... To fix this, you have to make your script executable by someone who has those rights... in Win32 IIS he is usually called IUSR+name of your web server. You do that in the IIS Admin tool. The other part of this problem may be that the path to your system command is unknown to the console. *This will work on Win32
#!/perl/bin/perl use strict; #use CGI qw(:all); #Install this module! #print header; #Life will get much easier! print "Content-type: text/html\n\n"; # Or you can hand code like the above all you want my @output = `echo %path%`; # my @output = `set`; #see all the goodies print "<b>Your web browsers path:</b><br> @output";
Name the file path.cgi or whatever... If your executable is not in your path.. viola` you have found why it doesn't work. Making the script run as a user who has that in his path, or physically moving the executable or a link to it in /perl/bin will also let you do it.... Hope this helps! :-) Revised: Added Win32 statement