Help for this page

Select Code to Download


  1. or download this
    return keys %{ {map { $_ => 1 } @_} };
    
  2. or download this
    say Dumper(\%{ {map { $_ => 'fish' } qw(one two red blue)} } );
                 ^ ^                                         ^ ^
                 |-|-----------------------------------------|-|
    
  3. or download this
    $VAR1 = {
              'blue' => 'fish',
    ...
              'red' => 'fish',
              'two' => 'fish'
            };
    
  4. or download this
    Ambiguous use of %{map{...}} resolved to %map{...}
    
  5. or download this
    $VAR1 = [
              'one',
    ...
              'blue',
              'fish'
            ];
    
  6. or download this
    say Dumper(\@{ {map { $_ => 'fish' } qw(one two red blue)} } );
    
  7. or download this
    Not an ARRAY reference