Transforming Unix Timestamps in logs to date

Logfiles in older unix systems and monitoring systems just log the unix timestamp as the first field in the enteries. When we try to pull out data for a particular date, then it becomes tricky. The following code snippet will help pulling out data for a particular date quite easily
cat <logfile> | perl -lane ‘$_=$F[0]; [...]

Perl Snippet to extract first column

Requirement : Obtain line no and first field (if it is a number) from the following datafile
31726108012^Abicyclepatrolpuyallup^A0^B
31726228012^Acommercialguardseattlesecurity^A0^B
31726230512^Aconstructionguardkentsecurity^A0^B
31726241512^Aeventfederalguardsecurityway^A0^B
^A indicates ctrl + A
perl -n -e ‘@line= split /^A/,$_ ; if (int($line[0]) != 0) { print “$. ” . $line[0] .”\n” }’ datafile
$. gives us the line no.
int(any non numeric value) will return 0.
To generate [...]