in reply to Re: incrementing a columnin thread incrementing a column
In your one liner ITYM if( $_ ne $last ) { $i++; $last = $_ }.