Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: How to test for empty hash?

by scareduck (Novice)
on Aug 06, 2021 at 18:06 UTC ( [id://11135659]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use Test::Simple (tests => 9);
    ...
    &ok(scalar(%hash), "Not empty: scalar");
    &ok(scalar(%hash) != 0, "Not empty: scalar != 0");
    &ok((keys(%hash) ? 1 : 0),"Not empty: keys");
    
  2. or download this
    1..9
    ok 1 - Version = v5.32.1
    ...
    ok 7 - Not empty: scalar
    ok 8 - Not empty: scalar != 0
    ok 9 - Not empty: keys
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-23 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found