sub function (%) { my %hashref = shift; ... } &function(%hash); # passes %hash as a ref