|
|
| XP is just a number | |
| PerlMonks |
Re^3: Need to check CSV file and identify rows containing old end dates and end timesby blindluke (Hermit) |
| on Feb 05, 2015 at 21:17 UTC ( [id://1115703]=note: print w/replies, xml ) | Need Help?? |
|
Point being, I can alway run the script that I show to produce the CSV file, but I need help (code) to then evaluate that CSV output It's very hard not to read the above quote as "write me the code I need". This is not the purpose of the Monastery. We're here to help, not to write code for you. If you want to learn, and you hope to see a code example to get you started on your own solution - look at the following code:
The output:
This is a code that solves a problem similar to yours - it operates on your input and it marks all the lines in which the end year is not current as #OLD#. You should start by making it operate on a file, rather than the DATA section, then focus on comparing the whole date, and not just the year. Some things that will be useful to you, like the Time::Piece module, are already in place. If you are interested in the numeric comparison between '2015-03-31' and the number 2015, and how it works, read the Context tutorial, and you will find the detailed explanation in the 'More flavors of scalars' section. Good luck. - Luke
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||