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 } '
<Reveal this spoiler or all in this thread>
Ron
In Section
Seekers of Perl Wisdom