WRT your edit
What do you think about a return instead of an if? e.g.:
sub fh_iterator { my $fh = shift; my $line = $fh->getline(); return $line unless $line; $line .= $fh->getline() while $line =~ m{\\$}; return $line; }
I don't think there's any functional difference, but one may be more readable than the other...
Thanks for your help!
In reply to Re^2: Iterator to parse multiline string with \\n terminator
by three18ti
in thread Iterator to parse multiline string with \\n terminator
by three18ti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |