http://qs1969.pair.com?node_id=1215216


in reply to I want to remove duplicate based on specific column and value.

This terse approach may hint at future possibilities for text file hackery:

perl -M5.010 -Mstrict -F, -wanle ' BEGIN{ $" = "," } our ($rpt, $non_key); if ( ($non_key // "") eq "@F[1..5]"){ print; # this line not right - exercise left to reader } else { $rpt = $F[4] -1; $non_key = "@F[1..5]"; print } '
Ron