--- Bob Mangold <[EMAIL PROTECTED]> wrote:
> As mentioned eariler...
>
> --- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote:
> You mentioned in the earlier email that you were calling your perl
> script
> via 'exec' (as I remember).
> Could you not use something like
> exec(' myperl.pl 2>&1 ' ) ?
>
> ok, this works, but what the heck is it doing. i've never seen that
> syntax.
lol -- it's not perl.
exec spawns a new process to replace the current one.
the argument ' myperl.pl 2>&1 ' is effectively run as if from the
command line, but with the current environment. From a *NIX command
prompt,
myperl.pl 2>&1
means run myperl.pl, and dup output stream 2 (the standard filehandle
number for STDERR) to stream 1 (the standard filehandle number for
STDOUT). Basically, this runs the script and lets the OS collect the
STDERR output after the fact, and shunt it down the STDOUT pipe. =o)
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/