Yes, I did. I had warnings turned off, and when I added them in my cutout Perl told me right away that == was the wrong operator.
And of course now it works.
And that infers the answer.
I'm guessing that "15 Jan" worked because it started with a number, where "Jan 15" is a string through and through.
But this particular typo has been in place for YEARS without being caught. Still wondering what changed in Debian land where it stopped working in the last month.
This, instead of checking for an empty string, will either send a successful ParseDate or 'today' to UnixDate. I'd suggest a more comprehensive sanity check on the date data, but this will catch more than just an empty string.
As you can tell from my posts, most of my Perl scripts are quick "get 'er done" type things. I am not a developer or programmer, but a jack-of-all-trades network guy.
That being said I appreciate any advice. I'll probably clean them up now that they've broken and I'm looking at them anyway.
I think in this case I got caught in the reversal of comparison operators between Bash and Perl. Per the ABSG chapter 7, the == operator is for strings and -eq is for integers. Exactly the opposite for Perl. So I probably had the Bash operators in mind when I wrote the original...