RollyGuy has asked for the wisdom of the Perl Monks concerning the following question:
At work here we are converting a tcl script into a perl script. One of the interesting lines of the tcl script is the following:
What this code does is open a process and run "./script.pl >& script.log" alongside of the tcl script. Then later, the "catch" function waits for the script to finish (if it hasn't) and grabs the exit value of "script.pl". Is there a way to do a similar thing in perl? Remember that the "script.pl" actually runs in parallel with the tcl script.set f_handle [open {|./script.pl >& script.log} a] -----Some deleted code-------- if [catch {close $f_handle} ] { send_mail "Script had a problem, returned non-zero status!." } else { send_mail "Script ok." }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: TCL to Perl
by mr_mischief (Monsignor) on May 16, 2003 at 19:16 UTC | |
Re: TCL to Perl
by Aristotle (Chancellor) on May 17, 2003 at 15:13 UTC |
Back to
Seekers of Perl Wisdom