in reply to hash sorting problems
don't do that - if you want to know how many elements are in an array, just get it's value in SCALAR context:foreach $word(@words){ $Counter = $Counter+1; #print("$word\n"); }
If you want to know what the index of the last element is, you can subtract 1 from $count or better yet:my $count = scalar @words; # style pointer: it is a $count not a $Counter
</code># not very useful my $last = $#words; # very useful for(0..$#words) { ... }
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|