#!/usr/sbin/perl -w # Program for modem pool log manipulation open(IN, $ARGV[0]) || die "cannot open $ARGV[0] for reading: $!"; open(OUT, ">$ARGV[1]") || die "cannot create $ARGV[1]: $!"; $i=0; while(){ if(/^call started/){ print OUT s/^call.*total/Modem Line 0\/$i : / ."\n"; $i++; } } close(IN); close(OUT);