Help for this page

Select Code to Download


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