in reply to multi-command sytem call
That said, the problem at hand can be solved in a few ways. One is the double open as tilly suggested. Another, more complicated, is to use fork and exec yourself. A third would be to use short-circuting in your system call, something like
Which meanssystem(q(fred & barney || true ));
run fred in the background, and then try to run barney (no need to background barney and it wouldn't allow the trick anyhow). If barney exits with 0 status echo runs and we have successful termination indicated by true's return value of 0.Use true, false, && and || as necessary to achieve the desired results.
UPDATE: You shouldn't even need the logic actually, you can twiddle the return code as needed within perl itslef. In short, loose the second ampersand :-P.
--
I'm not belgian but I play one on TV.
|
|---|