The "exec" function executes a system command and never returns -- use "system" instead of "exec" if you want it to return.
So, system should run each simple command serially, and wait for each to finish. For example:
use warnings; use strict; system 'sleep 5' and die "ERROR: sleep died\n"; system 'echo hello > foo.txt' and die "ERROR: echo died\n"; system 'cat foo.txt' and die "ERROR: cat died\n";
On my linux system, "sleep" executes, then "echo" then "cat".
In reply to Re: serial system executions
by toolic
in thread serial system executions
by azaria
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |