Help for this page

Select Code to Download


  1. or download this
    my %hash = ( ... );
    map { $hash{$_} = ($hash{$_} * 2) } keys %hash;
    
  2. or download this
    my %hash = ( ... );
    my %new_hash = map {  $_ => ($hash{$_} * 2) } keys %hash;
    
  3. or download this
    sub length {
        my ($h, @t) = @_;
        return 0 unless defined $h;
        return 1 + length(@t);
    }