What is this doing ??

2003-06-03 Thread T.S. Ravi Shankar
Hi all : I see these lines at the very beginning lines of a perl program. Could anyone explain what this is doing ?? eval '(exit $?0)' && eval 'exec perl $PERL_OPTIONS $0 ${1+"$@"}' & eval 'exec perl $PERL_OPTIONS $0 $argv:q' if 0; In what way "eval" help here in traping the errors ??

Re: sorry about how simple this question is

2003-06-04 Thread T.S. Ravi Shankar
Hi : There are number of good books available from O'reilly ... You can get more information here : http://safari.oreilly.com You may also want to visit these links : http://archive.develooper.com/[EMAIL PROTECTED]/ http://www.ebb.org/PickingUpPerl/pickingUpPerl_toc.html http://www.regenechse

Urgent : Can I override #! defn. through any command line option ??

2003-06-04 Thread T.S. Ravi Shankar
Hi all : My perl programme has a PERL path defined at its header through #! /rem/depot/local/bin/perl But I would like to run the same code with some other versions of PERL that are in different paths. Could I override the #! definition through any PERL command line option or through any other me

Re: How to : Configuration / reuse of package in a different directory

2003-06-04 Thread T.S. Ravi Shankar
Hi Wang : Try this : sub BEGIN { push @INC, "mysandbox/blah"; # you can include any path here } use myPackage.pm / Ravi Wenjie Wang wrote: > Greetins, > > I'm try to use another perl module of mine in a different perl file in > different directory. I would like to know how to use

Re: Urgent : Can I override #! defn. through any command line option ??

2003-06-04 Thread T.S. Ravi Shankar
nd.pl line 1. Why ?? Thanks again, Ravi "Beau E. Cox" wrote: > - Original Message - > From: "T.S. Ravi Shankar" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, June 03, 2003 11:04 PM > Subj

Re: Urgent : Can I override #! defn. through any command line option??

2003-06-04 Thread T.S. Ravi Shankar
Hi David ... That answers all my questions !!! Thank you very much, Ravi "Geer, David van der" wrote: > Hi Ravi, > > The first line "#!" tells the program how te read the executable. > F.e. if you would change it into "#!/bin/ksh" it means your (perl) script will be > executed using ksh.

Moving between directories

2003-06-29 Thread T.S. Ravi Shankar
Hi all : Could anyone tell me how I could move between the directories ( or change the present working directory ) with any perl command ?? I have tried these system '/bin/cd $HOME'; , chdir '$HOME'; , exec 'cd $HOME'; After I execute the perl code, the PWD still remains unchanged. If the a

Re: Moving between directories

2003-06-29 Thread T.S. Ravi Shankar
ce I was thinking of doing all "chdir"s inside the perl script with "system-cd"s ) Please let me know if you have any workarounds for this !! Thanks again, Ravi T.S. Ravi Shankar wrote: >Hi all : > >Could anyone tell me how I could move between the directories

problem with fork & wait

2004-03-29 Thread T.S. Ravi Shankar
Hi, At reaching a certain point in my perl program, I need to run a process ( say XYZ ) using SYSTEM command. The result file that this process would produce will be result.. I will have to wait until this result file is produced & then proceed extracting certain things from this file. I am imp