You set the input record separator to \n\n and then you will read a record at a time.
local $/ = "\n\n"; while(my $record = <DATA>) { next unless $record =~ m/^Some Header/; my ( $header, @lines ) = split "\n", $record; #print "$header @lines\n"; }
cheers
tachyon
In reply to Re: file parsing problem
by tachyon
in thread file parsing problem
by tamarind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |