hash of lists:

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zcabeli
    New Member
    • Jan 2008
    • 51

    hash of lists:

    can i define hash of lists:

    for example

    [CODE=perl]my %hash =
    {
    "list_A" => (2, 3 ,4)
    "list_B" => (3, 2, 1)
    }

    ...[/CODE]

    thanks
    Last edited by eWish; Apr 25 '08, 03:40 AM. Reason: Please use code tags
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    Yes, but you use square brackets because the list will actually be a reference:

    Code:
    my %hash =
    {
    "list_A" => [2, 3 ,4]
    "list_B" => [3, 2, 1]
    }
    See this page for more details: http://perldoc.perl.org/perldsc.html

    Comment

    Working...