Re: Simple process controll question

2003-07-20 Thread Paul Archer
11:29am, Ramprasad A Padmanabhan wrote: > > > do "foo.pl args..." > > > > > > And in foo.pl set some scope defined variable like > > > > > > #foo.pl > > > $dbh=connect() > > > unless($dbh){ > > > $GLOBAL::ERRORSTR="Couldnot connect to database $@"; > > >exit 1 > > > } > > > > > > > > > A

Re: Simple process controll question

2003-07-18 Thread Ramprasad A Padmanabhan
On Fri, 2003-07-18 at 22:34, Ming Deng wrote: > Ramprasad wrote: > > > else > > Instead in your main program call > > do "foo.pl args..." > > > > And in foo.pl set some scope defined variable like > > > > #foo.pl > > $dbh=connect() > > unless($dbh){ > > $GLOBAL::ERRORSTR="Couldnot connect

Re: Simple process controll question

2003-07-18 Thread Ming Deng
Ramprasad wrote: else Instead in your main program call do "foo.pl args..." And in foo.pl set some scope defined variable like #foo.pl $dbh=connect() unless($dbh){ $GLOBAL::ERRORSTR="Couldnot connect to database $@"; exit 1 } And in the main program you can check if($GLOBAL::ERRORSTR) {

Re: Simple process controll question

2003-07-17 Thread Ramprasad
Gabor Urban wrote: Hi, I think the question at hand may be quite simple, though I could not figure the asnwer out :-)) MyScript.pl runs an other script (foo.pl) with the system call: system foo.pl arg1 arg2 ; I would like to have a status report (error flag) from foo.pl, which does some exit's a

Simple process controll question

2003-07-17 Thread Gabor Urban
Hi, I think the question at hand may be quite simple, though I could not figure the asnwer out :-)) MyScript.pl runs an other script (foo.pl) with the system call: system foo.pl arg1 arg2 ; I would like to have a status report (error flag) from foo.pl, which does some exit's and die's at error