in reply to Dereferencing %hash that does not exist.
my $revmod = %{ $_[0] // {} }; [download]
Update: It should work with plain ||, too, in the older versions. Just make sure you never call it with 0 as the argument.