= @{$threads{$thread}}; # number of items in the thread
Ah, the beauty of Perl! It looks like nonsense, but it works <G>
$threads{...} is the hash
$thread is the key of the hash
$threads{$thread} is the value for that key, which is an array
Putting the @ in front of the array returns the size of the array.
And, that's is what is correctly printed out.
It's one of the FEW things I did correctly! <G>