in reply to Re: Counting ID on the basis of batchin thread Counting ID on the basis of batch
# warning win32 doublequotes perl -F"\W" -lanE "$r{join('|',@F[0,4,1])}++}{say s/(\|\w+$)/\|$r{$_}$ +1/r for keys %r" data.txt [download]
L*