in reply to Passing an array into an open command
my @a; foreach(1..50){ $a[$_-1] = $_; } open(T, "test2.pl @a|"); while(<T>){ print; } close(T);
If I run test1.pl, I get 1..50 printed out on seperate lines, just like you would expect.foreach(@ARGV){ print "$_\n"; }
- Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing an array into an open command
by amw1 (Friar) on Mar 18, 2004 at 18:16 UTC | |
by tcf22 (Priest) on Mar 18, 2004 at 18:36 UTC |