Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Count non-empty hash values

by fishbot_v2 (Chaplain)
on Oct 22, 2005 at 17:34 UTC ( [id://502232]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $non_empty = grep { $a{$_} ne "" } keys %a;
    print "Keys with non-empty values: $non_empty\n";
    
    __END__
    Keys with non-empty values: 2
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-18 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found