my @arr = qw/092205 092305 092605/; foreach (@arr) {$_ = sprintf "%d%d/%d%d/%d%d", split //} print "@arr";