sub hash { my %in = @_; . . . } sub hashref { my $in = shift; my %in = %{ $in }; . . . } hash( foo => 'bar' ); hashref({ foo => 'bar' });