for( @data ) { ## use $_ to alias the lines my $p = length(); ## Allow pre-decrement and count backwards $freq{ chop() }[ --$p ] += $inc while $p; ## implicit arg for chop; avoid call to length. }