in reply to Another system redirect problem
Well thanks to all who posted.
You exposed a flaw in my thought process... I was thinking of system(@xyz) as only suspending metachar expansion, but of course if I can't already do that in the shell why would it work in perl. I saw '>>' as part of the shell's command expansion. But I didn't realise that system(@abc) executes the called program directly, so does no shell expansion.
I hadn't realised that it would be so complicated for a late night 'simple' task.
I think that all the solutions posted (correct me if I'm wrong (again)) are effectively variations on using a pipe and capturing the output into the wanted file. For my comfort zone I'll stick with the core perl solution rather than the lower level IPC stuff.
Thanks for your time, I hope this question saves a few others from the confusion I created for myself
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Another system redirect problem
by ikegami (Patriarch) on Jun 19, 2011 at 19:50 UTC | |
by trendle (Novice) on Jul 07, 2011 at 06:10 UTC |