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


in reply to compare values while value on other column remains the same

What output do you expect from the given sample data? I do not understand the specification.

Note that eof returns 0 or 1 if used as a number, so $i < eof will not do what you think.