open the file, create a new file, read each line of the source file, check
if it starts with subnet, if not write it to the new file. When you are
done, close both files, delete the source file (if you are sure your script
has made the right changes), then rename the output file to the source.

Some functions you may want to look up which will be of help

open
while
next

oh, and read up on regexs so you can construct a regex to check for subnet.

If you need help with your code, post again and I'm sure we will assist...

HTH

John

-----Original Message-----
From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2001 16:29
To: [EMAIL PROTECTED]
Subject: RE:delete a line of a file


Hi, I would like to parse a file and delete the entire line if it begins
with 
subnet.
How can I do this in Perl?
Thanks.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to