Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Identical Arrays

by davido (Cardinal)
on Aug 26, 2012 at 03:57 UTC ( [id://989781]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    my @a = ( 1, 2, 3 );
    ...
        @hash{ @$left, @$right } = ();
        return scalar keys %hash == scalar @$left;
    }
    
  2. or download this
    use List::MoreUtils qw/any/;
    
    ...
        } keys %left, keys %right;
        return 1;
    }
    
  3. or download this
    use List::MoreUtils qw/any/;
    
    ...
        return 0 if any{ $bag{$_} } keys %bag;
        return 1;
    }
    
  4. or download this
    use Set::Bag;
    
    ...
                    && $bag_b->difference($bag_a) eq '()';
        return 0;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://989781]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found