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


in reply to Re^2: Reading concurrently two files with different number of lines
in thread Reading concurrently two files with different number of lines

diff would not understand the continuation lines, but it doesn't necessarily have to. You can break your problem into two parts, and attack them individually:

  1. Normalize your inputs
  2. Compare your inputs

The first you would do with Perl. Write a script that just handles the line continuations and normalizes your input into a "clean" format.

You could then use diff to do the actual comparison between the two files. If diff doesn't meet your requirements for some reason, your comparison code would still be cleaner and simpler for not having to deal with the line continuations.

Christopher Cashell