I'm sure Perl can do this, yet searching the PODs and PerlMonks Q&A comes tantilisingly close, but not close enough. I just cant find a simple explanation/example for this.
I want to store a list of things into one element of a hash, and another list in another hash etc..
First off lets just try putting one list into one hash element:
Any help or explanation would be great!my @test = ( qw / bing bong bang / ); print '['.$test[2].'] ['.$test[1].'] ['.$test[0]."]\n"; $bits{'one'}= @test; my @new = $bits{'one'}; print '['.$new[2].'] ['.$new[1].'] ['.$new[0]."]\n"; OUTPUT: [bang] [bong] [bing] [] [] [3]
Thanks,
___ /\__\ "What is the world coming to?" \/__/ www.wolispace.com
In reply to A hash of lists by wolis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |