Hi Alex,

Thanks for the reply. Your right, something had to have changed. But it wasn't the script. After I made the post I looked at the errors more carefully; in particular the error with the most information.

Unrecognized character \x0E; marked by <-- HERE after warnings;<-- HERE near column 14 at /usr/local/share/perl/5.28.1/Role/Tiny/With.pm line 4.

I opened file at the end of that path "With.pm". Then I looked at line 4. Sure enough there was some odd control character there. In fact there were odd control characters peppered through the file. But the strange this is the timestamp on the file was from 2019. So it was the original timestamp of the installed file (my script was made in 2021). Fortunately, I have a copy of this same file (With.pm) on another Linux box I have that was built at the same time. I checked that file and it had no control characters. I swapped it out with the (corrupted) one. Then ran my script - and it was fine. No more errors.

My problem is solved but what I don't understand is how the file got corrupt (maybe a power surge or power outage?). But what I really don't understand is how that file from 2019 (With.pm) was changed but the filetimestamp didn't change. Maybe a corruption doesn't always trigger a timestamp update?

Thanks again for the reply. I was going to write that I had it solved just as I saw your post.

Mike


In reply to Re^2: DateTime throwing an error by nachtmsk
in thread DateTime throwing an error by nachtmsk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.