# Perl 6 :) sub restart_server (Str +$host, Int +$port, Int +$timeout) { ...; } # Call using restart_server host => "...", port => ..., timeout => ...; # or restart_server :host«...», :port(...), :timeout(...); #### # Perl 5 sub foo { my $a = shift; ...; } #### sub foo { my ($a, $b, $c, $d) = @_; ...; } #### sub foo { my %args = @_; my ($a, $b, $c, $d) = @args{qw( a b c d )}; # Or: my ($a, $b, $c, $d) = @{{@_}}{qw( a b c d )}; ...; }