1 I tried using http://localhost/cgi-bin/printenv.pl, but I get the same result 'page not found' http 400. I tried using localhost:80 also.
2 yes, I am getting 'page not found' error and there is http 400 besides it
oh vow, its running now. when I typed http://localhost/cgi-bin/printenv.pl, it did run and asked me to run or save the printenv file. When I clicked on run, it just run but did not display any output on console. Why is that ? second time, I saved output on desktop and I can see printenv file on the desktop (without any .pl extension). when I click on this file, it just runs and does not open. When I open with notepad, then I can see the output. why is that ? why is there no extension on the output file ? There is no extension on the file in cgi-bin dir also. Its there as printenv. How does perl interpreter understand that this is perl file without .pl extension ? If I have pHp interpreter also set in the environment variable path, which ijnterpreter will execute this printenv file, which does not have an extension ?
| [reply] |
An executable script starts with a call to the interpreter to be used, in this case something akin to
#!/usr/bin/perl
This is the interpreter used to run the script.
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
| [reply] [d/l] [select] |
| [reply] |