in reply to Input redirection
To simulate the same behavior, just close STDIN before calling system (assuming you don't need it):
If you do need STDIN, and still need your multiple-argument form of system, consider saving STDIN, closing it, and re-opening it when you're done:close(STDIN); system($ci, '-u', '-zLT', $file);
Incidentally, does the -q flag allow you to do this in a "batch"/non-interactive mode without worrying about this sort of thing?open(STDSAVE, "<&STDIN"); close(STDIN); system(...); open(STDIN, "<&STDSAVE");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Input redirection
by Withnail (Novice) on Dec 14, 2000 at 04:38 UTC |