Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

delete element in Hash of array

by Kandankarunai (Novice)
on May 23, 2011 at 09:33 UTC ( #906274=perlquestion: print w/ replies, xml ) Need Help??
Kandankarunai has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, How to delete a element in hash of array?

Comment on delete element in Hash of array
Replies are listed 'Best First'.
Re: delete element in Hash of array
by GrandFather (Sage) on May 23, 2011 at 09:39 UTC

    What have you tried and what documentation did you read?

    True laziness is hard work
Re: delete element in Hash of array
by jethro (Monsignor) on May 23, 2011 at 09:54 UTC

    You can always access the array inside a hash of arrays if you put @{} around the hash value $hash{'thingy'}. Quite simple after you get used to it

      Assuming if you know the key you want to delete..

      delete $hash{$key};
        Unfortunately the question is so poorly phrased, that nobody can tell in which nesting level an element should be deleted.

        You're answering another question than jethro did.

        Cheers Rolf

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://906274]
Approved by GrandFather
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-11-30 16:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (777 votes), past polls