lerameur wrote:
Hello,
Hello,
I want to write a perl script that invokes unix command.
perldoc -f qx
perldoc -f system
perldoc -f fork
perldoc -f exec
perldoc -f open
perldoc perlipc
perldoc perlopentut
perldoc IPC::Open2
perldoc IPC::Open3
perldoc IPC::Run
perldoc Expect
perldoc Shell
Some of the
command can take a long time to process, I have many commands I want
to invoke. Lets say the first command can take one minute to
process, how can I make sure the second command will not start until
the irst one is complete,
From the shell you could do:
command1 && command2
Assuming that command1 returns EXIT_SUCCESS on success and EXIT_FAILURE on
failure.
In Perl, unless you explicitly run the command in the background then perl
will wait for it to finish.
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/