Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by kennethk (Abbot)
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
Replies are listed 'Best First'.
Re^4: ignore duplicates and show unique values between 2 text files
by Laurent_R (Monsignor) 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 perusing the Monastery: (12)
As of 2015-07-28 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (259 votes), past polls