Help for this page

Select Code to Download


  1. or download this
    my %hash = map ( $_ => 1 ), @array;
    
  2. or download this
    (my %hash = map( $_, 1 )), @array;
    
  3. or download this
    my %hash = map +( $_ => 1 ), @array;
    
  4. or download this
    print +( $x ? $y : $z ), "\n";
    
  5. or download this
    (print( $x ? $y : $z )), "\n";
    
  6. or download this
    my @foo = map { 1, 2 } 3, 4;
    
  7. or download this
    my @foo = map { ; 1, 2 } 3, 4;
    print "@foo\n";
    __END__
    1 2 1 2
    
  8. or download this
    my @foo = map +{ 1, 2 }, 3, 4;
    
  9. or download this
    my @foo = map { 1, 2 }, 3, 4;
    print "@foo\n";
    __END__
    HASH(0x814cbb8) HASH(0x814cd5c)