On Thu, Mar 4, 2010 at 2:12 PM, YAPH <yet.another.perl.hac...@gmail.com> wrote:
> 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; This isn't a Perl script. This is a shell script to be executed by whichever shell lives at /usr/bin/sh on your system. It sets the shell variables ORACLE_HOME and LD_LIBRARY PATH, and then calls /bin/perl to re-evaluate the file. When the perl interpreter reads the file, it ignores the shell statements. See perlrun for the gory details. A less complex method would be to just set $ENV{ORACLE_HOME}, etc. in Perl. HTH, --jay -------------------------------------------------- This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] private and confidential daggerquill [at] gmail [dot] com http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org values of β will give rise to dom! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/