Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Getting a Hash Name

by Dietz (Curate)
on Jul 04, 2005 at 11:38 UTC ( #472202=note: print w/replies, xml ) Need Help??


in reply to Getting a Hash Name

So why not simply extend your subroutine:

my %hash1 = ( one => 1, two => 2 ); check_limit(\%hash1, '%hash1'); sub check_limit { my $href = $_[0]; my $name = $_[1]; my $num = 0; for (keys %{$href}) { $num++ }; print "Hash '$name' has $num keys\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://472202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2016-09-25 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (466 votes). Check out past polls.