exec() exits the calling program and does not return.
system() returns the called program's exit status then allows the
calling program to resume execution.
"Programming Perl", 3rd Edition, p.811
On Fri, 2002-12-13 at 08:01, Paul Kraus wrote:
> if I exec a Perl script from a Perl script that fir
ginal Message-
> > From: Kipp, James [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 13, 2002 9:15 AM
> > To: 'Paul Kraus'; 'Perl'
> > Subject: RE: Calling another perl script
> >
> >
> > I rarely use 'exec' but i believe
aul Kraus'; 'Perl'
> Subject: RE: Calling another perl script
>
>
> I rarely use 'exec' but i believe the parent script just
> exits . here is some more from the docs:
>
> Since it's a common mistake to use "exec" instead of
> "syst
exec ('foo') }; print STDERR "couldn't exec foo: $!";
or maybe i am not understaning you correctly. could you be talking about
fork -> exec?
HTH
Jim
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13,
; From: Kipp, James [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 9:04 AM
> To: 'Paul Kraus'; Perl
> Subject: RE: Calling another perl script
>
>
> perldoc -f exec
> exec LIST
> exec PROGRAM LIST
> The "exec" function executes
perldoc -f exec
exec LIST
exec PROGRAM LIST
The "exec" function executes a system command *and never
returns*-- use "system" instead of "exec" if you want it to
return. It fails and returns false only if the command does not
exist *and* it is executed directly inste