in reply to hash slice
The shape of the braces indicate that @hsh{@ary} is a slice of a hash, rather than a slice of an array, which would be @hsh[@ary].
Applying undef to a hash slice relies on undocumented behavior, but the intent is to get all those keys to exist in the hash. A better technique is
@hsh{@ary} = ();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash slice
by dragonchild (Archbishop) on Mar 10, 2005 at 15:40 UTC | |
by Roy Johnson (Monsignor) on Mar 10, 2005 at 15:54 UTC | |
by Tanktalus (Canon) on Mar 10, 2005 at 16:52 UTC | |
by Roy Johnson (Monsignor) on Mar 10, 2005 at 17:56 UTC |