The idiomatic Perl way to implement "the last n elements of an array" would be code along the lines of
my @last_n = @array[-n .. -1];
or
for my $i (-n .. -1) { func($array[$i]) }
In reply to Re: ignore some delimiters while using split
by AnomalousMonk
in thread ignore some delimiters while using split
by nurulnad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |