in reply to Getting a Hash Name
my $name = "HASH"; my %$name = ( one => 1, two => 2 ); check_limit($name); sub check_limit { my ($hname) = $_[0]; my $num = 0; for (keys %{$hname}) { $num++ }; print "Hash: $hname has $num keys\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting a Hash Name
by chromatic (Archbishop) on Jul 04, 2005 at 20:26 UTC |