my $removing = 0; while (<>) { if (/^MYTAG1/) { $removing = 1; } elsif (/^MYTAG2/) { $removing = 0; } print unless $removing; }
In reply to Re: How do I remove lines from a file...
by thelenm
in thread How do I remove lines from a file...
by ginju75
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |