{ local $/ = ''; while (<>) { print "Data block No. $.:"; foreach my $line (split /^/m) { line_func($line); } } }