use strict; &foo( x=> 10, ); sub foo { my %args = @_; my $x = $args{'x'} || 0; my $y = $args{'y'} || 0; print "Args: x=> $x , y=> $y\n"; }