RE:How to delete a line in a file

2001-11-26 Thread Tim . Moose
Better yet... perl -ni.bak -e "print unless /^\s*subnet/" input.txt will update input.txt and backup the original file in input.txt.bak. Tim ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo

RE:How to delete a line in a file

2001-11-26 Thread Tim . Moose
>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. Step one: Type the command perl -e "print unless /^\s*subnet/" -n infile.txt >outfile.txt where infile.txt and outfile.txt have the obvious meaning. Step two:

RE:How to delete a line in a file

2001-11-26 Thread Jorge Goncalvez
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. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users