Help for this page

Select Code to Download


  1. or download this
    %chores = (Monday    => "dishes",
               1         => "Tuesday",
               vacuum    => "2",
               Wednesday => "garbage",
               "3");
    
  2. or download this
    Odd number of elements in hash assignment
    
  3. or download this
    my %chores = (Monday    => ["dishes"  , "1"],
                  Tuesday   => ["vacuum"  , "2"],
    ...
    
    my $value = join ' ', @{ $chores{Wednesday} };
    print "$value\n";