I just received my O'Reilly's Learning Perl book and my first script is not working. I have been learning Perl on my own for a month but this book is new to me. Anyway this simple script probably is not working because it is not locating the file:
Code:
#!C:\Perl\bin
print "Content-type: text/html\n\n";
use CGI qw(:standard -debug);
use strict;
my @lines;
@lines = 'perldoc -u -f atan2';
foreach (@lines) {
s/\w<([^>]+)>/\U$1/g;
print;
}
I am running Perl on Windows XP Pro with IIS. OK, everything is installed right as I have been learning and running scripts for a few weeks. This 'perldoc -u -f atan2' is something by other book did not mention.
I can run
perldoc -u -f atan2 fine from the command prompt, but not from the above script. I am thinking that I have to tell the script where perldoc is located and I am not sure how to do that.
Additional information that might be helpful:
perldoc is located at: C:\Perl\bin
The script is in: C:\Inetpub\wwwroot\cgi-bin\OReilly
I am trying to access the script using this in the browser window:
http://localhost/cgi-bin/OReilly/whirlwind.cgi and only prints
perldoc -u -f atan2 out.