in reply to perl to Remove duplicates lines from a csv file based on timestamp most recent

Just to add to pme's solution: You are declaring my ($col1,$date_and_time,$col2,$col3,$col4) within the while loop, so they go out of scope after each iteration.
However, even if you move the declaration outside the loop, you still would have single values, so you'd end up printing the values of the very last input line.
  • Comment on Re: perl to Remove duplicates lines from a csv file based on timestamp most recent
  • Download Code