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

Re^3: compare two files and print the differences of file 2 in a third file

by dbander (Scribe)
on Jun 16, 2017 at 13:43 UTC ( [id://1192937]=note: print w/replies, xml ) Need Help??


in reply to Re^2: compare two files and print the differences of file 2 in a third file
in thread compare two files and print the differences of file 2 in a third file

Your issue is that you are not reading GOODFILEproperly.

You thanked me for taking the time to look at your code.
I will now thank you to take the time to actually try the answer I gave you.

Click on the spoiler link below to see what the problem is.

I added a chompand printstatement after each of the while()statements, which is what I asked you to do.

Here's what I get when I run the modified version of your script:

Starting script Enter the GOOD file: GoodFile.txt Enter the BAD file: BadFile.txt GOODFILE line: 'GOODFILE' BADFILE line: 'Amimal, cat, 1, 4, YELLOW HAIR 3, HIGH 'this is a catt +t 1' BADFILE line: 'This section is the description of the animal bla bla +lbas.....bla bla lbas.....' BADFILE line: 'Amimal, cat, 3, 4, YELLOW LEG 3, HIGH 'this is a cattt + 1' BADFILE line: 'This section is the description of the animal bla bla +lbas.....bla bla lbas blaaaal........'

Look closely at the line which shows what data you are "reading" from GOODFILE.
Do you still think it is me who doesn't understand your problem?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found