in reply to compare two files line by line and perform a diff on each coressponding line

Why not just use the diff utility? Or perhaps comm? No need to reinvent the wheel - code reuse doesn't stop at CPAN.

Replies are listed 'Best First'.
Re^2: compare two files line by line and perform a diff on each coressponding line
by toolic (Bishop) on Jun 01, 2010 at 14:57 UTC
    Why not just use the diff utility?
    That is confusing advice, given the fact that the OP is already using diff. I believe the question is how to use it to avoid unexpected behavior (which the OP did not clearly specify).