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