in reply to Combining s///

When dealing with dates, I always convert them to YYYYMMDD, the only sane form.

for my $date (@dates) { my @parts = split qr!/!, $date; if ($parts[2] < 50) { # arbitrary cutoff $parts[2] += 2000 } else { $parts[2] += 1900 }; $date = join "", @parts[2,0,1]; }; @sorted = sort @dates;

Conversion back to the other date format is left as an exercise to the reader