Jim Gibson <jimsgib...@gmail.com> writes:
> On Oct 31, 2018, at 1:29 PM, Martin McCormick <marti...@suddenlink.net> 
> wrote:

> > my $t1 = Time::Piece->strptime("$obtime[1], %d %b %Y %H:%M:%S %z”);
> 
> strptime is a method with two arguments:  string to be parsed, format to 
> be used for parsing. You have one argument: a double-quoted string.
> 
> my $t1 = Time::Piece->strptime($obtime[1], "%d %b %Y %H:%M:%S %z”);

Thank you!  I forgot to keep that in mind.  As I kept trying
to get it to work and ended up with the , that separates the
arguments inside the whole string.  I may have even had it right
once but that may have been when at least one %variable was set
to the wrong case which would have made the correct format also
fail but for different reasons.  %d should have been the first
field which is the day of the month and instead, I had %D which
is a specific United States way of expressing a date 

        I know we all have our stupid moments but sometimes, I wish
I didn't have so many.

        Now, $t1 shows a nice representation of the UTC date that
the web server stamped the XML file with.

Martin McCormick

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to