good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: perl to Remove duplicates lines from a csv file based on timestamp most recentby soonix (Canon) |
on Jan 05, 2015 at 10:13 UTC ( [id://1112164]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|