Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Deleting hash entry

by tcf22 (Priest)
on Dec 16, 2003 at 15:01 UTC ( #315064=note: print w/replies, xml ) Need Help??


in reply to Deleting hash entry

I think you meant:
%hash = ( abc => { def => 1, }, ghi => { jkl => 1, }, );
Hashes use (), hash refs use {}.

delete($hash{abc}{def});
should work for deleting a second level key.

- Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://315064]
help
Chatterbox?
erix denies everything
[shmem]: erix: bad idea. PerlMonks is based on everything

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2017-04-25 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (454 votes). Check out past polls.