Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Modification of non-creatable hash value attempted

by akho (Hermit)
on Mar 07, 2008 at 10:25 UTC ( [id://672728]=note: print w/replies, xml ) Need Help??


in reply to Modification of non-creatable hash value attempted

On an unrelated note: use delete to remove items from a hash. If you just set them to undef, the hash keys stay (and they will be present in any loop through the hash):

use warnings; use strict; my %a; $a{a} = undef; $a{b} = 1; print keys %a, "\n"; # prints 'ab' delete $a{b}; print keys %a, "\n"; # prints 'a'

Log In?
Username:
Password:

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

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

    No recent polls found