in reply to Re^2: Best way to execute a set of commands in perl
in thread Best way to execute a set of commands in perl
might be clearer.my @cmds; push @cmds,qq(p4 sync -k $options{v}); push @cmds,qq(p4 -x $options{f} delete) if (exists $options{f}); push @cmds,qq(p4 -x $options{a} add) if (exists $options{a}); system($_) for @cmds;
By the way, I suspect that no one replied to this question because they did not know you asked a new one. I only looked because I wanted to see if there was a response. Probably better to do a new post in future.system(qq(p4 sync -k $options{v})); system(qq(p4 -x $options{f} delete)) if (exists $options{f}); system(qq(p4 -x $options{a} add)) if (exists $options{a});
|
|---|