Help for this page

Select Code to Download


  1. or download this
    # note that having a sub for this is overkill, but if you 
    # need more functionality, it's easy to encapsulate here (such
    ...
    if (stringify([sort @array1]) eq stringify([sort @array2])) {
        # arrays are the same
    }
    
  2. or download this
    my %matches;
    while (my ($key,$value) = each %somehash) {
        # stringified arrays as keys
        push @{$matches{stringify([sort @$value])}} => $key;
    }