hi experts
I want to delete a line in a file depending on the content of line,
if my file is like this
aaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbb
ccccccc ddddddddd eeeeeee
eeeeee perl ffffffff gggggggg
hhhhhhhhhh
Here i want to remove the 4th line because it contains word "perl" !!
( of course i like perl)
i try ed this
open FD , "< /home/file1 " or die " Can't open file1 file : $!";
open FD2 , "> /home/file2 " or die " Can't open file2 file : $!";
while(<FD>)
{
print FD2 $_ unless ($_=~/perl/);
}
close FD;
close FD2;
"and move file2 to file1"
but i don't want to use 2 file ,
can i do this within the original file
--
Thanks
Chandu.B.S
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>