in reply to counting number of fileds
my @last_three = ( split /,/ )[ -3 .. -1 ]; [download]
See perldata (for arrays and lists), perlfunc (for split), and perlop (for ..)