What's new
Guest viewing limit reached
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation
  • Already a member? Click here to login

CGI : Quiz of the Week

AlienTech

Emerging Talker
PF Member
Messages
20
Highlights
0
Reaction score
0
Points
42
Peak Coin
0.000000¢
DB Transfer
0.000000¢
This is just a simple little question for you to answer, since most people dont know CGI.

But at the top of a CGI Script, is a line, what does this line do.

Line: #!/usr/bin/perl

Note: This is just a simple little question, lol:).
 
so does #!/usr/sbin/perl5
or #!/root/bin/kissmyassyousonofabitch
The directory names have no meaning. It could be anything.
 
That is known as the 'shebang' line. Yes, it calls Perl and its actual content is only relevant to where Perl is installed, it is however generally #!/usr/local/bin/perl or #!/usr/bin/perl. Generally, this will be the first line of any Perl script.

However, most coders use a shebang line like this '#!/location/of/perl -wT' as this turns on both warning and taint modes which are generally required for a higher standard of coding practice.
 
Back
Top