in reply to Finding the length of an array in a hash of arrays

Hi Foxcub,

to get just the lengths of all the arrays in the hash, you could use
#!/usr/bin/perl -w use strict; my %valid=( first => [1..8], second => [1..3], third => [1..6] ); for(keys %valid){ print "the length of \$valid{$_} is ", scalar @{$valid{$_}}, "\n"; }


which produces
the length of $valid{first} is 8 the length of $valid{third} is 6 the length of $valid{second} is 3
on my machine.

hope this helps

thinker