in reply to Re^2: Comparing adjacent lines
in thread Comparing adjacent lines

I've been trying out different things and just can't get it to work...any ideas?

Replies are listed 'Best First'.
Re^4: Comparing adjacent lines
by aaron_baugher (Curate) on Jul 12, 2012 at 15:29 UTC

    Lots of them, depending on what "doesn't work" means.

    Aaron B.
    Available for small or large Perl jobs; see my home node.

      Right you are, my apologies. The ex values that are not "ex1" (ex1 is produced at a mismatch in the comparison) revert to the default value of ex# (for example, ex18 or ex30) instead of counting up from 1. Basically, what I think is happening is ex1 is not passed on to the else part, since ex values get clobbered after one iteration of the loop. I've been trying variations of an ex variable external to the loop, but can't seem to figure it out.

        I'm still having trouble understanding what you mean. Please post your code, along with about a dozen lines of your input data that demonstrate the problem, as well as what you would like the output from those lines to be.

        Aaron B.
        Available for small or large Perl jobs; see my home node.