# this sub takes named parameters: sub restart_server { # the variables to store the parameter values in: my ($host, $port, $timeout); # extract the parameter values: get_named_params({ host => \$host, port => \$port, timeout => \$timeout }, \@_ ); # ... }