Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$date="201004061749" DB<153> p $date 201004061749 DB<154> ($year,$mon,$day,$hour,$min)=split(/(\d{4})(\d{2})(\d{2})(\d +{2})(\d{2})/,$date) DB<155> p $year DB<156> p $mon 2010 DB<157> p $day 04 DB<158> p $hour 06 DB<159> p $min 17
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I thought I understood split...
by kennethk (Abbot) on Apr 06, 2010 at 17:07 UTC | |
|
Re: I thought I understood split...
by ikegami (Patriarch) on Apr 06, 2010 at 17:54 UTC | |
|
Re: I thought I understood split...
by ambrus (Abbot) on Apr 06, 2010 at 18:07 UTC | |
|
Re: I thought I understood split...
by roboticus (Chancellor) on Apr 06, 2010 at 17:16 UTC |