http://www.perlmonks.org?node_id=1031249


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.

Replies are listed 'Best First'.
Re^4: ignore duplicates and show unique values between 2 text files
by Laurent_R (Canon) 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.