- or download this
my ($foo, $bar) = @{shift(@_)}{qw/ -foo -bar /};
- or download this
shift(@_)
# get an element from the parameter list
...
my ($foo, $bar) = @{ shift(@_) }{ qw/ -foo -bar / };
# assign the two element list retrieved into $foo and $bar
- or download this
foobar({ -foo => 'FOO', -bar => 'BAR' });
...
my ($foo, $bar) = @{shift(@_)}{qw/ -foo -bar /};
print "\$foo => $foo, \$bar => $bar\n";
}