in reply to Re: delete above matching line?
in thread delete above matching line?
Reading the file into a string did the trick, thanks.
{ local $/ = undef ; open TEST,'test' or die "Denied: $!\n" ; my $string = <TEST> ; close TEST ; $string =~ s/\n\nstart_of_block.*?};//s ; print $string ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: delete above matching line?
by happy.barney (Friar) on Jul 01, 2010 at 08:19 UTC | |
by oldmanwillow (Novice) on Jul 01, 2010 at 16:34 UTC |