Ron McKeever wrote:
RIp
----- ----- ----- ----- ----- ----- -----
1074715516 111 222.222.2.2 2566 111.111.111.1 80
111.111.111.1
1074715516 222 . 3584 . 80
.
1074715516 400 . 2500 . 6100
.
1074715516 500 etc 3000 etc 53
.
1074715516 700 . 2700 . 5100
.
1074715516 400 . 2500 . 7100
.
1074715516 900 . 9000 . 25
.

try reading the old log itself and writing a new log:


open (FHIDATA,"<logfile") or die "some error";
open (FHODATA, ">newlogfile") or die "some error";

If the data you DO NOT want is at the end of the record; try:
next if /(?:25|53|80)$/;

finally print everything else:
print FHODATA $_;

--
_Sx_ http://youve-reached-the.endoftheinternet.org/ _____
     http://jaxpm.insecurity.org/
     http://cis4dl.insecurity.org/

--
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