can somebody help a (clueless) brother out?use strict; use warnings; my $when = '2003-07-14 21:39:26.357'; my ( $yr, $mo, $day, $hr, $min, $sec ) = ( $when =~ /(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/ ); print "( $yr, $mo, $day, $hr, $min, $sec )\n"; __DATA__ Use of uninitialized value in concatenation (.) or string at C:\dev\sc +ripts\reg.pl line 6. Use of uninitialized value in concatenation (.) or string at C:\dev\sc +ripts\reg.pl line 6. Use of uninitialized value in concatenation (.) or string at C:\dev\sc +ripts\reg.pl line 6. Use of uninitialized value in concatenation (.) or string at C:\dev\sc +ripts\reg.pl line 6. Use of uninitialized value in concatenation (.) or string at C:\dev\sc +ripts\reg.pl line 6. Use of uninitialized value in concatenation (.) or string at C:\dev\sc +ripts\reg.pl line 6. ( , , , , , )
my ( $yr, $mo, $day, $hr, $min, $sec ) = ( $when =~ /(\d{4})\D*(\d\d)\D*(\d\d)\D*(\d\d)\D*(\d\d)\D*(\d\d)/ );
In reply to Re: Re: Converting MySQL datetime values to DateTime objects (regex)
by LanceDeeply
in thread Converting MySQL datetime values to DateTime objects
by jonadab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |