Deda has asked for the wisdom of the Perl Monks concerning the following question:
How do I 'undef' a hash entry - not the value, but the key? if i write%hash=( a => 1 b => 2 }
i getundef $hash{a}
What i want to get is%hash=( a => undef b => 2 }
I need this for %ENV modification (UX: unset equivalent).%hash=( b => 2 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'undef'ing a hash element
by antirice (Priest) on Aug 26, 2003 at 12:13 UTC | |
by Deda (Novice) on Aug 26, 2003 at 12:17 UTC | |
|
Re: 'undef'ing a hash element
by arthas (Hermit) on Aug 26, 2003 at 12:17 UTC | |
by welchavw (Pilgrim) on Aug 26, 2003 at 13:49 UTC |