in reply to Removing lines from a file.
you should really have this:if ($_ !~ /^zone \"$domain\" \{/ .. /\}\;/)
unless (/^zone \"$domain\" \{/ .. /\}\;/)
Why? In your version you use the (/A/ .. /B/) syntax to extract a range of lines between /A/ being true and /B/ being true. When you test for ($_ !~ /A/ .. /B/) then you get everything between /A/ being false and /B/ being true. That's not what you want.
buckaduck
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Removing lines from a file.
by mofo (Acolyte) on Apr 18, 2001 at 06:02 UTC |