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 [...]