You need to use code tags, not only for the program code, but also for the the data that the program is supposed to read. In the text of your question, please use code tags to display:
Mon Feb 20 09:31:25 2017 [INFO] [AGENTEXEC] Error Description.
code tags also put things into a fixed width font. Your program is unable to parse this line:
2017-02-20T09:30:53.177000 20[] 0000000000000000 Error Description

In Perl, it is possible to define a file that is contained within the program code itself! This is called a DATA segment. A simple example:

#!/usr/bin/perl use strict; use warnings; while (<DATA>) { print; } __DATA__ Some example lines that could be in a file
The __DATA__ segment is a pre-opened file handle. There are ways to put multiple input files within the code, but a DATA segment for a single file is the most often used.

It is not clear to me what the desired output is. Please include an example of that in your post.


In reply to Re^3: DateTime::Format::Flexible; for Log Parse with multiple formatted lines by Marshall
in thread DateTime::Format::Flexible; for Log Parse with multiple formatted lines by TCLion

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.