Beefy Boxes and Bandwidth Generously Provided by pair Networks
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 recent

by soonix (Canon)
on Jan 05, 2015 at 10:13 UTC ( [id://1112164]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1112164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found