in reply to ignore some delimiters while using split
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]) }
|
|---|