Syntactic Confectionery Delight | |
PerlMonks |
Re: convert a given YYYY-MM-DD to epoch timeby ambrus (Abbot) |
on Dec 04, 2015 at 22:26 UTC ( [id://1149417]=note: print w/replies, xml ) | Need Help?? |
Are you sure that this is the exact code you're running? The line numbers don't seem to match. In any case, if it is the same code, then you never seem to handle the case when the regular expression actually matches. Maybe your input file contains lines where it doesn't match. Use an if statement around the assignment, such as
You might also want to use some anchors in the regex if you want to make sure the whole line matches.
In Section
Seekers of Perl Wisdom
|
|