in reply to Assign (key, value) to a hash w/o clobbering hash

The second solution gets my vote, but if you are worried about the extra array, just make it a 'my' variable inside a set of braces. If you are doing this several time in your code:
sub add2hash { my ($value, $hashref) = @_; my @array = (split /X/, $value); $hashref->{$array[0]} = $array[1]; } ... add2hash ('fooXbar', \%hash); add2hash ('bishXbash', \%hash);
OK, possibly a sledge hammer to crack a nut, depends on how many time you are doing it.
update: corrected missing $