Help for this page

Select Code to Download


  1. or download this
     k1   v1 k2   v2 k3   v1     v1           v2
    (a => 1, b => 2, c => 1) => (1  => [a,c], 2 => [b])
    
  2. or download this
    use strict;
    use warnings;
    ...
        push @{$inverted{$hash{$_}}}, $_ for keys %hash;
        return map {@{$inverted{$_}} > 1 ? @{$inverted{$_}} : ()} keys %in
    +verted;
    }
    
  3. or download this
    a
    c