PDA

View Full Version : #!/usr/bin/perl -w


hamboy
03-01-2006, 08:38 PM
i see this line in one of my cgi file...

#!/usr/bin/perl -w


what does this mean or do? is # in the front mean it's commented, so if i delete it, it won't affect anything?

FishMonger
03-01-2006, 08:49 PM
Both this and you prior question sound like homework questions.

Do a google search for "shebang line"

hamboy
03-01-2006, 09:12 PM
Both this and you prior question sound like homework questions.

Do a google search for "shebang line"


lol people ask these as hwk questions? noo i've just never been exposed to cgi/perl.. just looking into a script and trying to learn..

thanks btw

drhowarddrfine
03-01-2006, 09:21 PM
Homework question? Sheesh.

The line tells the shell where the program is for, in this case, interpreting the script. The -w is an option for the Perl interpreter and gets fed to it. The beginning #! is the tip off to the shell to use the following path to find the program to feed this file to.