in reply to Re: How to delete a particular line in a text file after some operation on that text file at the same time
in thread How to delete a particular line in a text file after some operation on that text file at the same time
my $file = 'C:\shekhar_Axestrack_Intern\WindowCreation\ListOfIpAdress. +txt'; tie my @lines, 'Tie::File', $file or die "can't update $file: $!"; # define sub Fun such that it returns 0 if Time > 34, 1 otherwise @lines = grep { Fun($_) } @lines; untie @lines; sub Fun { my($line) = @_; #I do manupulation on this line to get time fr +om string # print $fho $line unless $div > 36; if( $time > 37) {return 0;} else{ return 1;} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to delete a particular line in a text file after some operation on that text file at the same time
by eyepopslikeamosquito (Archbishop) on Jan 18, 2015 at 07:35 UTC | |
|
Re^3: How to delete a particular line in a text file after some operation on that text file at the same time
by GotToBTru (Prior) on Jan 19, 2015 at 19:44 UTC |