in reply to Re^2: using a variable as a filehandle
in thread using a variable as a filehandle
That doesn't work, because you're changing the context of =~ from scalar to list. while ($record->{data} =~/(.*)\n/g) { my $line = $1; would be the equivalent without the chomp.
However, neither solution will always work with Windows text files. See my reply to this post's grandparent.
|
|---|