- or download this
#/usr/bin/perl
use strict;
...
while (my $line = $fh_iterator->($fh)) {
# do stuff to $line
}
- or download this
$line .= $fh_iterator->($fh) if $line =~ /\\\n/
- or download this
sub fh_iterator {
my $fh = shift;
...
$line .= fh_iterator($fh) if $line =~ /\\\n/;
return $line;
}