Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2017-09-24 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (273 votes). Check out past polls.

    Notices?