while ($response=<$remote>){ #manipulate response here } #### while ($foo=){chomp $foo;push @ary, $foo}; print "@ary"; __DATA__ foo bar baz quud quux