Help for this page

Select Code to Download


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