for (@somelist) { my($foo,$bar) = split; my $x = somecalc($foo,$bar); # this line won't work!! push @$somehash{$foo.$bar}, $x; }