in reply to Manipulating Text File in Perl

It sounds like you want a simple state machine. You're checking for duplicates and also checking for two parts of a tuple.
No big deal. Here are some hints:

First off, use split(/,/, $_) to break up the line.

Then for converting lat and longitude formats:

my @latitude = split(/\./, $_[5]); my $latstring = sprintf("%8s", ($latitude[0] . $latitude[1])) ;

And finally for the state machine (totally untested):

while (<LOGFILE>) { chomp $_; if ($_[0] eq $lastline ) { if ($_[0] eq "1sec CDMA Event DtiC(0)") { #average those things or whatever you neeed to do }elsif ( $_[0] eq "Generic Scanner PN Measurement DtiC(0)") { #average those things or whatever you need to do } } else { #determine which part of the tuple this line is and #store Rxpower/add Rxpower and massage lat/long into strings } $lastline = $_[[0]; }

As I mentioned, all code is untested, but it's a starting point.
--
jpg