A
ace
I would like to make a prototype for hpush subroutine which then can be
used like:
hpush %hash, %h2;
hpush %hash, {foo => 1};
Currently I have to dereference the hash which looks quite ugly:
hpush %hash, %{{foo => 1}};
=============
sub hpush(\%\%) {
my ($h1, $h2) = @_;
%$h1 = (%$h1, %$h2);
return $h2;
}
used like:
hpush %hash, %h2;
hpush %hash, {foo => 1};
Currently I have to dereference the hash which looks quite ugly:
hpush %hash, %{{foo => 1}};
=============
sub hpush(\%\%) {
my ($h1, $h2) = @_;
%$h1 = (%$h1, %$h2);
return $h2;
}