I just want to convert the dates from 20111230 format to 30-dec-2011.
20111230
30-dec-2011
One way is to use Date::Simple:
use warnings; use strict; use Date::Simple qw(d8); my $d = d8('20111230'); print $d->format('%d-%b-%Y'), "\n"; __END__ 30-Dec-2011