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

Re^2: complete deletion from hash

by inman (Curate)
on Nov 24, 2005 at 10:51 UTC ( [id://511400]=note: print w/replies, xml ) Need Help??


in reply to Re: complete deletion from hash
in thread complete deletion from hash

The following worked in scalar context without using keys to give list context. An empty hash gives 0 in scalar context.
delete $hoh{Testcase}{comp}{cmd} unless %{$hoh{Testcase}{comp}{cmd}}; delete $hoh{Testcase}{comp} unless %{$hoh{Testcase}{comp}};

Log In?
Username:
Password:

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

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

    No recent polls found