Search notes:

Perl variables: $# (last index of array)

use warnings;
use strict;

my @foo = (0, 1, 2, 3, 4, 5);

print "Last index: $#foo\n";
Github repository about-perl, path: /variables/%23___last_index_of_array.pl

See also

Perl variables

Index