Help for this page

Select Code to Download


  1. or download this
    %newhash = reverse do { my $hash = reverse %myhash; %hash };
    
  2. or download this
    @unique_keys = do { my $hash = reverse %myhash; values %hash };
    
  3. or download this
    %myhash = (1 => 'a', 2=> 'b', 3=> 'a', 4=>'c',5 => 'b', 6 => 'a');
    @k = do {
    ...
    3 => a
    2 => b
    5 => b