On Thu, Jul 19, 2001 at 04:51:14PM -0400, Anshu Anshu wrote:
> I got a perl script .. First two line are like I never saw before ..
> 
> "#!/usr/local/bin/perl
> 
> #!/temp_perl/bin/perl -I/temp_perl/lib/perl5 -I/temp_perl/lib/perl5/5.00502 
> -I/temp_perl/lib/perl5/site_perl/5.
> 005/sun4-solaris/
> "
> 
> Anyone has any idea what is meaning of 2nd line above.

My guess is that at some point someone has compiled perl 5.005_02 on a
Sun sparc running Solaris in /temp_perl.  This may not have been
properly installed but they wanted to use it to run your program.

The line in question is a shebang line, used to tell the OS how to run
your program.  It says to use perl in /temp_perl/bin/perl and the add
the directories following -I to @INC.

When it is not the first line in the file it is simply a comment (it
starts with a #) and so it is ignored.

PS.  Your first line should have -w on the end unless you are using perl
5.6 and have "use warnings" later in the file.  It should also be
followed in short order by "use strict".  Check out the archives or any
good book on Perl if you don't know why.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to