Help for this page

Select Code to Download


  1. or download this
           Since you can assign to a list of variables, you can also assig
    +n to an
           array or hash slice.
    ...
               ($colors{'red'}, $colors{'blue'}, $colors{'green'})
                              = (0xff0000, 0x0000ff, 0x00ff00);
               ($folks[0], $folks[-1]) = ($folks[-1], $folks[0]);
    
  2. or download this
     @days[3,4,5]        # same as ($days[3],$days[4],$days[5])
     @days{'a','c'}      # same as ($days{'a'},$days{'c'})