Help for this page

Select Code to Download


  1. or download this
    my %hash = (
        foo  => ['this', 'that'],   # Two different values
    ...
        baz  => ['the', 'other'],   # Not the same
        buzz => ['same', 'same'],   # The same
    );
    
  2. or download this
    my %hash = (
        foo  => ['this', 'that'],   # Two different values
    ...
            print "$key\n";
        }
    }
    
  3. or download this
    if (2==@$aref && $aref->[0] eq $aref->[1]) ...
    
  4. or download this
    while (my ($key, $aref) = each %hash) {
        my %seen;
    ...
        next if 1 != keys %seen;
        print "$key\n";
    }