Help for this page

Select Code to Download


  1. or download this
    @hash{ qw( foo bar baz ) } = ( 1, 2, 3 );
    
  2. or download this
    $hash{ foo } = 1;
    $hash{ bar } = 2;
    $hash{ baz } = 3;
    
  3. or download this
    @keys = qw( foo bar baz );
    @copy{ @keys } = @orig{ @keys };
    
  4. or download this
    @h{ @flds } = @{ $d }{ @flds };  # hash slice assignment
    
  5. or download this