Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by kennethk (Monsignor)
on Apr 29, 2013 at 15:59 UTC ( #1031249=note: print w/ replies, xml ) Need Help??


in reply to Re^2: ignore duplicates and show unique values between 2 text files
in thread ignore duplicates and show unique values between 2 text files

This is Perl; just about everything is "possible". However, I fail to see why the two column example is functionally different than a full line comparison. "261293\t'snow > equipment > goggles'" will equal "261293\t'snow > equipment > goggles'" just as much as the two substrings would. Are you dealing with a case where the numbers change and you need to be insensitive to that?

Breaking the two columns apart can easily be achieved with code like my @terms = split /\t/, $line;. See split.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re^3: ignore duplicates and show unique values between 2 text files
Select or Download Code
Re^4: ignore duplicates and show unique values between 2 text files
by Laurent_R (Parson) on Apr 29, 2013 at 17:35 UTC

    However, I fail to see why the two column example is functionally different than a full line comparison. "261293\t'snow > equipment > goggles'" will equal "261293\t'snow > equipment > goggles'" just as much as the two substrings would. Are you dealing with a case where the numbers change and you need to be insensitive to that?

    Yes, I totally agree, the same code should just work as well.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-09-20 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (157 votes), past polls