Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: ignore duplicates and show unique values between 2 text files

by Khen1950fx (Canon)
on Apr 29, 2013 at 17:06 UTC ( #1031260=note: print w/ replies, xml ) Need Help??


in reply to ignore duplicates and show unique values between 2 text files

An easier way is to use List::Compare:
#!/usr/bin/perl -l use strict; use warnings; use List::Compare; my (@Llist) = qw(abc def 121 xyz); my (@Rlist) = qw(def 121); my $lc = List::Compare->new( \@Llist, \@Rlist ); my (@sdiff) = $lc->get_symmetric_difference; foreach my $sdiff(@sdiff) { print $sdiff; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2016-07-26 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (236 votes). Check out past polls.