in reply to Get the length of a list.

Also, you can find the last index in the array like this:

my @list = (1, 2, 3, 4, 3, 2, 1); print STDERR "Last index: $#list\n";

It's clearly not the length, but it is handy in some settings.