- or download this
sub convert {
my %arg = @_;
my ($from, $to, $thing) = @arg{qw /from to thing/};
...
}
- or download this
sub convert {
my %arg = @_;
...
my $thing = exist $arg{thing} ? $arg{thing} : 'default';
...
}
- or download this
sub convert {
my %arg = (from => 'default',
...
my ($from, $to, $thing) = @arg{qw /from to thing/};
...
}
- or download this
sub convert {
my %arg = @_;
...
my $thing = $arg{thing} || 'default';
...
}
- or download this
sub convert {
local @ARGV = @_;
...
'thing:s' => \my $thing);
...
}