On Thu, Jul 31, 2003 at 09:32:32AM -0500, Distribution Lists wrote:
> Can someone give me a clue
>
> I want to search through a file for a given string, when the string is
> found then delete the whole line. For example
There's a nice FAQ on this
% perldoc -q 'change one line'
> test.user: cd9p06
>
> search for "test.user", then delete "test.user: cd9p06"
I'd usually use something like this:
local ($^I, @ARGV) = ('', $filename);
while (<>) {
print unless /test\.user/;
}
Or just do it from the command-line
% perl -ni -e 'print unless /test\.user/'
--
Steve
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]