sperate day,month,year from given date string
by kalai[ Edit ] 2008-12-19 12:25:20
code to display day,month and year from given date string
$_ = '2008/12/19';
$year,$month,$day) = m<^(d{4})/(dd?)/(dd?)>;
print $month;
or another method to display day,month and year from given date string
my %date;
$_ = '2008/12/19';
@date{ qw/ year month day/} = m<^(d{4})/(dd?)/(dd?)>;
printf "%4d/%2d/%2d", @date{ qw/ year month day/};