Or then use another variable to give the name to subroutine.print "Hash: hash1" check_limit(\%hash1); sub check_limit { my $hname = $_[0]; my $num = 0; for (keys %{$hname}) { $num++ }; print " has $num keys\n"; }
In reply to Re: Getting a Hash Name
by Hena
in thread Getting a Hash Name
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |