c:\@Work\Perl\monks\AnomalousMonk>perl -wMstrict -le "my %hash = ( foo => [1, 2, 3, 4], bar => [3, 5, 7], ); ; elements(\%hash, qw(bar foo)); ; sub elements { my $hashref = shift; for my $name (@_) { print qq{elements of $name: }, scalar @{ $hashref->{$name} }; } } " elements of bar: 3 elements of foo: 4