By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,282 Members | 1,617 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,282 IT Pros & Developers. It's quick & easy.

hash of lists:

P: 51
can i define hash of lists:

for example

Expand|Select|Wrap|Line Numbers
  1. my %hash = 
  2. {
  3.    "list_A" => (2, 3 ,4)
  4.    "list_B" => (3, 2, 1)
  5. }
  6.  
  7. ...
thanks
Apr 22 '08 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
Yes, but you use square brackets because the list will actually be a reference:

Expand|Select|Wrap|Line Numbers
  1. my %hash =
  2. {
  3. "list_A" => [2, 3 ,4]
  4. "list_B" => [3, 2, 1]
  5. }
See this page for more details: http://perldoc.perl.org/perldsc.html
Apr 22 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.