Help for this page

Select Code to Download


  1. or download this
    GetOptions (
      "a=s" => \@a,
    ...
    );
    @a = split(/,/,join(',',@a));
    @b = split(/,/,join(',',@b));
    
  2. or download this
    my $opt = { # this has to be first because the sub-refs
                # below are closures using it.
    ...
    GetOptions( $opt,
      'grot=s@' => $splitter,
    ) or die "can't parse options";
    
  3. or download this
    my $from_file = sub {
        my ($name, $val) = @_;
    ...
        $opt->{$name} = <$fh>;
        close($fh);
    };