I\'m trying to figure out the proper PBP approved way to process a multi line string one line at a time. Many Perl coders suggest treating the multi line string as a filehandle
You can also use a regexp as an iterator:
my $data = q{Hello This Is A Test}; while( $data =~ /(.+)$/mg) { print "line is '$1'\n"; }
This is slightly less convoluted compared to using a filehandle that represents a string.