Today I have encountered a problem that required me to determine the maximum index of an array in perl. I used to do it this way:
my @array = (1, 2, 3); print $
That gives you the last index. It's documented in perldata - http://perldoc.perl.org/perldata.html