> -----Original Message-----
> From: Alex Harris [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 11:06 AM
> To: [EMAIL PROTECTED]
> Subject: why doesn't this error
> 
> 
> First, I read perldoc -f exec() and did as follows:
> 
> exec "rsh $plant /u1/bin/forkit 'work.pl'" or
>        print STDERR "Couldn't fork it.\n $!\n";
> 
> BUT, even though the file it should be exec - ing 'work.pl' 
> does NOT exist 
> on the remote system, the error doesn't get kicked off.  The 
> only error I've 
> gotten it to register is if $plant is invalid.  Any ideas?

The exec will only fail if rsh doesn't exist. Assuming rsh
exists, rsh *completely replaces* your perl script. Any problems
encountered by rsh will be apparent only after your perl script is
gone.

You need to use system() instead of exec() if you need to determine
whether rsh had any problems.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to