e.g.
problem is I don't know what $foo and $bar are so I can't create the anonymous list before I get into the loop and if I did $somehash{$foo.$bar} = []; first then surely it would reset the list each time round the loop!?for (@somelist) { my($foo,$bar) = split; my $x = somecalc($foo,$bar); # this line won't work!! push @$somehash{$foo.$bar}, $x; }
please help.
In reply to push onto hash! by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |