Hi,

Edward: Your script doesn't work, as you are only opening the file in
read mode.  Read/write doesn't do want you want either.

{Blushes} Thanks for the correction Jon.


If you want a quick'n'easy one liner, then use -i:

-i[extension] edit <> files in place (makes backup if extension supplied)

Your one liner would look like:

perl -ne 'print unless /perl/' -ibak FILENAME


Glad I learnt yet another One-Liner.

--
Regards,
Edward WIJAYA
SINGAPORE

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to