in reply to counting number of fileds

Or with grep ;^)
$_="1,2,3,4,5,6"; @lastthree=grep{$_ if$i++<3}reverse split/,/;