- or download this
sub do_something {
my ($red, $yellow, $blue) = @_;
...
}
- or download this
my ($red, $blue, $green) = qw(1 1 1);
...
do_something(\$red, \$blue, \$green);
print "$red, $blue, $green\n";
- or download this
my %hash = (
red => 1,
...
do_something(\%hash);
print "$hash{red}, $hash{blue}, $hash{green}\n";