![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Page 37 gives an example of a hash slice. The important concept to note is that the sigil (the symbol in front of a variable name, like $, @, or %) connotes what kind of value is being retrieved, not what kind of variable is being accessed.
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
Caution: Contents may have been coded under pressure. In reply to Re: hash slice
by Roy Johnson
|
|