So.. Before you assign the arrayref to the $params hashref, you can do: untie %$params; or this disgusting hack which I found interesting: my %params2 = %$params; $params = \%params2; # copy the dereferenced hash, then assign it back to $params.