... # somewhere in your code f($AoH); ... # elsewhere in your code f([$hashref1, $hashref2]); ... # and at some other point f([\%hash]); ...