in reply to Problems with 'strict' and variables created on the fly
Well, yes!
Untested code:
my %pages; $pages{"page1"} = [ 1,2,3]; $pages{"page2"} = [ 5,6,7]; print $pages{"page1"}->[1]; print $pages{"page2"}->[2];
What you are looking for is a hash of arrays, which is a common perl idiom. Check out the perldsc and perllol manual pages.
|
|---|