use strict; use warnings; # my $file = shift || die "No file, dummy!"; # open FH, "<", $file or die "Could not open ($file) for reading: $ +!"; local $/ = "\n.\n"; while (defined (my $record = <DATA>)) { chomp $record; print $record; # <STDIN>; } __DATA__ sdjh sfhg srig srgsrigh . . . asdigf wsergh
This gives:
sdjh sfhg srig srgsrigh.asdigf wsergh
A . was left there unremoved, if that's the bug you are looking for (As it cannot handle empty record.)
In reply to Re: Spot the Bug
by pg
in thread Spot the Bug
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |