> + > + use File::Stream; > + my $stream = File::Stream->new($filehandle); > + > + $/ = qr/\s*,\s*/; > + print "$_\n" while <$stream>;
I know this is the example from the docs, but you end up still putting
a regex in $/, and it won't work for (and will screw up) other
filehandles in the program.
This would be a safer way to show it:
use File::Stream;
my $stream = File::Stream->new($filehandle,
separator => qr/\s*,\s*/,
);
print "$_\n" while <$stream>;
-R
