-----Original Message-----
From: sanket vaidya [mailto:sanket.vai...@patni.com] 
Sent: Friday, March 05, 2010 5:36 PM
To: 'YAPH'
Subject: RE: Can anybody explain me what this shebang line is doing?


>From: YAPH [mailto:yet.another.perl.hac...@gmail.com] 
>Sent: Friday, March 05, 2010 12:42 AM
>To: beginners@perl.org
Subject: Can anybody explain me what this shebang line is doing?

Hi,

I got a perl script that begins like this.

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-
#!/usr/bin/sh -- # -*- perl -*-

eval 'ORACLE_HOME=/opt/oracle; export ORACLE_HOME;LD_LIBRARY_PATH=/opt/
oracle/lib; export LD_LIBRARY_PATH; exec /bin/perl  $0 ${1+"$@"} ;' if
0;

#Pel statements start from here

----------------------------------------------------------------------------
----------------------------------------------------------------------------

My guess is it's setting some shell variables (environment), and then
launching the perl interperter so that the rest of the script is
treated as a perl script.

But, I would really appreicate it, if somebody can explain me what's
happening here exactly.

Thanks!

********************************************************************

Hi,

It tells which program to use for execution of the script on LINUX & UNIX.

So in your case it would be first using the shell.

If you use Perl on windows 'Shebang' line will be treated like a perl
comment i.e. after '#' everything following in that line will be treated as
comment.

Thanks & Regards
Sanket Vaidya

***************************************************************************
Forgot to add group in the loop.

Thanks & Regards,
Sankte Vaidya




_____________________________________________________________________ 

This e-mail message may contain proprietary, confidential or legally privileged 
information for the sole use of the person or entity to whom this message was 
originally addressed. Any review, e-transmission dissemination or other use of 
or taking of any action in reliance upon this information by persons or 
entities other than the intended recipient is prohibited. If you have received 
this e-mail in error kindly delete this e-mail from your records. If it appears 
that this mail has been forwarded to you without proper authority, please 
notify us immediately at netad...@patni.com and delete this mail.
_____________________________________________________________________

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to