http://www.perlmonks.org?node_id=69480


in reply to Answer: How do I delete/modify one line from test file ?
in thread files

I can't get that to work how. Could you post a more complete answer. I am feeding the push command the line that I want removed but it doesn't do anything. What am I doing wrong?
  • Comment on Re: Answer: How do I delete/modify one line from test file ?

Replies are listed 'Best First'.
Re: Re: Answer: How do I delete/modify one line from test file ?
by arturo (Vicar) on Apr 04, 2001 at 01:48 UTC

    well, if you're pushing the line you don't want onto the array, it's going to end up in the array. It might help to think of another way of doing the same thing:

    push @array, $line unless $line eq 'b|b';

    Read the fine manual! => perldoc -f push

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor