Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is kinda a tricky question, so I'll try to word it clearly. I have a hash. This hash contains the name of files. I want to beable to load an array structure or reference into the hash value. For example
$hash{'filname'} = @arrayThe array structure needs to stay intact while loaded into the hash
$array[1] = "..."; $array[2] = "...";I need to beable to call the array items through the hash, if its possible like
$hash{'filename'}[0]; $hash{'filanem'}[1]; etc...I dont know if this is possible, or how I can make proper multi-level hashes.
Can someone please shed some light on this issue and show me the perly gates?
Thanksjanitored by ybiC: Replaced frowned-upon <pre> tags with <code> tags, minor format tweaks for legibility.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array in a hash
by tmoertel (Chaplain) on Oct 12, 2004 at 21:02 UTC | |
by Anonymous Monk on Oct 12, 2004 at 21:14 UTC | |
by Anonymous Monk on Oct 13, 2004 at 18:26 UTC | |
|
Re: Array in a hash
by qumsieh (Scribe) on Oct 12, 2004 at 21:05 UTC |