Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

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


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

I think your posted code will not follow the posted spec. The posted lines contain additional whitespace, so my ($number,$article) = split /\s+/, $line will yield

$number = 261293 $article = 'snow
as opposed to split /\t/, $line, which would yield
$number = 261293 $article = 'snow > equipment > helmets'
Update: Parent code updated

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


Comment on Re^4: ignore duplicates and show unique values between 2 text files
Select or Download Code
Re^5: ignore duplicates and show unique values between 2 text files
by LanX (Canon) on Apr 29, 2013 at 16:10 UTC
    Well sorry I noticed my problem after I saw your code and updated it in the meantime. =)

    Anyway considering the bad data the OP showed till now, it's better not expecting '\t' as delimiter...

    ... at least as long as there is no third column coming into play. =)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      Not the cleanest problem statements, to be sure. I still want to know why the OP cares that the records contain multiple 'columns'.

      I tried communicating the code issue via private msg when I spotted it, but you appear to be ignoring me.


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

        > but you appear to be ignoring me.

        indeed sorry, =)

        I wasn't aware that \ignore also filters private \msgs.

        (No idea why and when you came on the list...)

        Cheers Rolf

        ( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-10-02 01:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls