proxima has asked for the wisdom of the Perl Monks concerning the following question:
Can someone explain to me the difference between the following two fragments of code, and why one works differently to the other: First fragment:
Second fragment:@Call[0] = "gawk -f test.gawk test.file > out.file"; system(@Call);
The first example works as planned - the second example runs the gawk script, but doesn't redirect the output. I've tried other variations, none of which work. Can anyone help me understand how to implement a redirection like in the second example? Thanks.@Call[0] = "gawk"; @Call[1] = "-f"; @Call[2] = "test.gawk"; @Call[3] = "test.file"; @Call[4] = ">"; @Call[5] = "out.file"; system(@Call);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Array for system() call
by MZSanford (Curate) on Oct 23, 2001 at 16:53 UTC | |
by dmmiller2k (Chaplain) on Oct 23, 2001 at 22:09 UTC | |
by blakem (Monsignor) on Oct 23, 2001 at 22:45 UTC | |
by dmmiller2k (Chaplain) on Oct 23, 2001 at 23:46 UTC | |
Re: Array for system() call
by broquaint (Abbot) on Oct 23, 2001 at 16:53 UTC | |
Re: Array for system() call
by snafu (Chaplain) on Oct 23, 2001 at 19:03 UTC | |
Re: Array for system() call
by pike (Monk) on Oct 23, 2001 at 19:08 UTC | |
Re: Array for system() call
by thunders (Priest) on Oct 23, 2001 at 19:19 UTC | |
Re: Array for system() call
by Ven'Tatsu (Deacon) on Oct 24, 2001 at 03:17 UTC |
Back to
Seekers of Perl Wisdom