in reply to Is it possible to assign an array reference to a value in hash
Is it possible to assign a array reference as a value to a hash key ?
You can use array references as keys in just the way you might guess that you can... the limitation is that you can't retrieve the key and then dereference it. This is because hash keys are strings by definition and when you use a reference as a key, it stringifies the reference first.
You probably want Tie::Refhash to do what you want to do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to assign an array reference to a value in hash
by snape (Pilgrim) on May 15, 2012 at 02:21 UTC | |
by NetWallah (Canon) on May 15, 2012 at 03:30 UTC |