in reply to Creating Arrays on the Fly
while ($response=<$remote>){ #manipulate response here }
or if you want it in array form for later processing, something similar to :
while ($foo=<DATA>){chomp $foo;push @ary, $foo}; print "@ary"; __DATA__ foo bar baz quud quux
Question : why doesn't 1 while {push @ary,<DATA>} do what's expected?That is, take a line from <DATA> and push it onto @ary. I seem to get stuck in a infinite loop... What behavior of <DATA> am I missing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Creating Arrays on the Fly(boo)
by chromatic (Archbishop) on Sep 11, 2001 at 21:51 UTC | |
|
Re:x2 Creating Arrays on the Fly(boo)
by grinder (Bishop) on Sep 12, 2001 at 10:46 UTC |