Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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"; }


Comment on Re: Getting a Hash Name
Download Code

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 romping around the Monastery: (12)
As of 2014-10-23 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls