in reply to Re: How do I get the last element of an array?
in thread How do I get the last element of an array?

You could also use:
perl -e "@m-(1,2,3);print $m[-1]"