in reply to Keyed matrix
Under warnings, you would have got%chores = (Monday => "dishes", 1 => "Tuesday", vacuum => "2", Wednesday => "garbage", "3");
To solve your problem, you need a hash of arrays:Odd number of elements in hash assignment
See Perl Data Structures Cookbook and Perl references and nested data structures for details.my %chores = (Monday => ["dishes" , "1"], Tuesday => ["vacuum" , "2"], Wednesday => ["garbage" , "3"]); my $value = join ' ', @{ $chores{Wednesday} }; print "$value\n";
|
|---|