my @last_three = ( split /,/ )[ -3 .. -1 ];
See perldata (for arrays and lists), perlfunc (for split), and perlop (for ..)
--In reply to Re: counting number of fileds
by fruiture
in thread counting number of fileds
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |