local $_ = '20040515'; my ($year, $month, $day) = unpack 'A4 A2 A2', $_; my $date = "$day/$month/$year";