in reply to Re: Calling a Program from a Program
in thread Calling a Program from a Program

Just for my clarification. $foo will capture a fork error if it occurs?
I am not educated enough in perl to understand the logical or in
$foo or exec ....
  • Comment on Re: Re: Calling a Program from a Program

Replies are listed 'Best First'.
Re: Re: Re: Calling a Program from a Program
by Zaxo (Archbishop) on Jun 17, 2003 at 17:44 UTC

    The return value from fork has three states,

    • undef - meaning fork failed
    • 0 - meaning you're in the child process
    • true - meaning you're in the parent, and the numeric value is the pid of the child

    That's all documented in the perldoc linked by fork.

    After Compline,
    Zaxo