in reply to Re: Counting ID on the basis of batch
in thread Counting ID on the basis of batch

eh no! uneasy question uneasy answer!
# warning win32 doublequotes perl -F"\W" -lanE "$r{join('|',@F[0,4,1])}++}{say s/(\|\w+$)/\|$r{$_}$ +1/r for keys %r" data.txt

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.