Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    use strict;
    ...
    my %by_value = reverse %hash;
    
    print Dumper(\%by_value);
    
  2. or download this
    $VAR1 = {
              '1' => 'a',
              '2' => 'e'
            };
    
  3. or download this
    my %hash = (
      a => 1,
      b => 1,
    ...
    }
    
    print Dumper(\%by_value);
    
  4. or download this
    $VAR1 = {
              '1' => [
                       'a',
    ...
                       'd'
                     ]
            };