in reply to delete lines till
More readable, more versatile:local $/ = ''; while (<>) { next if /\A.*\nD$/m; print; }
local $/ = ''; while (<>) { chomp( my @rec = split /^/m ); my $hdr1 = shift(@rec); my $hdr2 = shift(@rec); my %rec = @rec; next if $hdr2 eq 'D'; print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: delete lines till
by Anonymous Monk on Aug 25, 2009 at 06:38 UTC | |
by Anonymous Monk on Aug 25, 2009 at 10:54 UTC |