Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Difference between two arrays - is there a better way?

by blindluke (Hermit)
on Aug 09, 2011 at 08:58 UTC ( [id://919422]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    for (keys %repeats) {
        push @diff, $_ unless $repeats{$_} > 1;
    }
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    @diff{ @list1 } = undef;
    delete @diff{ @list2 };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://919422]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-18 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found