$a = "default" unless defined $a;
$h{key} = "value" unless exists $h{key};
####
$a = "default" unless $a;
$h{key} ||= "value";
####
my $a_val = defined $a ? $a : "default";
my $h_key_val = exists $h{key} ? $h{key} : "value";
####
my $a_val = $a || "default";
my $h_key_val = $h{key} || "value";
####
sub do_stuff
{
# get args from the call
my ( %raw_args ) = @_;
# build up hash of default arg values
my %default_args = ( foo => 'bar', baz => 'quux' );
# now join the two, giving precedence to %raw_args
my %args = ( %default_args, %raw_args );
}