Help for this page

Select Code to Download


  1. or download this
    %hash=@array;
    @ints = keys %hash;
    @strs = values %hash;
    
  2. or download this
    %hash= reverse @array;
    @strs = keys %hash;
    @ints = values %hash;
    
  3. or download this
      DB<103> %hash = reverse qw/1 A 2 B 3 C 4 D 5 E/
     => ("E", 5, "D", 4, "C", 3, "B", 2, "A", 1)
    ...
      DB<105> values %hash
     => (1, 3, 4, 2, 5)