Help for this page

Select Code to Download


  1. or download this
    sub option {
        my ($self, $key, $value) = @_;
    ...
            $self->{options}->{$key} = $value :
            $self->{options}->{$key};
    }
    
  2. or download this
    @hash{ map $array[$_], grep !($_ & 1), 0 .. $#array } = map $array[$_]
    +, grep $_ & 1, 0 .. $#array;
    
  3. or download this
    sub merge_hash {
        my ($hash, $array) = @_;
        @$hash{ map $array->[$_], grep !($_ & 1), 0 .. $#{$array} } = map 
    +$array->[$_], grep $_ & 1, 0 .. $#{$array};
    }
    
  4. or download this
    sub merge_hash (\%\@) {
    ## rest unchanged
    }