in reply to Re: Dumb question...probably...
in thread Dumb question...probably...

Here's the code

use DateTime; use DateTime::TimeZone; #For testing $zone = "America/Chicago"; $date = "8/5/1967"; $time = "8:30:00"; my $tz = DateTime::TimeZone->new( name => $zone ); ($day,$month,$year) =~ split(/\//,$date); ($hour,$minutes,$seconds) =~ split(/\:/,$time); my $dt = DateTime->new( year => $year, month => $month, day => $day, hour => $hour, minute => $minutes, second => $seconds, );
What am I missing here...? Regards, Kepler

Replies are listed 'Best First'.
Re^3: Dumb question...probably...
by Your Mother (Archbishop) on Aug 20, 2014 at 19:57 UTC
    ($hour,$minutes,$seconds) =~ split(/\:/,$time); print join "|", ($hour,$minutes,$seconds); -- ||

    "=~" ne "="; :P --> use strict; use warnings;

Re^3: Dumb question...probably...
by kepler (Scribe) on Aug 20, 2014 at 20:00 UTC
    Oh crap... the =~ in split... :/

      This is the fourth time you've been told to use warnings; use strict; (1, 2, 3). use warnings; use strict; is also the first item on the Basic debugging checklist. The second item on the Basic debugging checklist, printing your values, would have shown you that your original assumption "the values are not empty" was wrong.

      A reply falls below the community's threshold of quality. You may see it by logging in.