my @sorted = map $_->[0], sort { $a->[11] cmp $b->[11] || #Date, original # $a->[12] cmp $b->[12] #Time, to do list } map [ $_, join('', (/(..)-(..)-(....)/)[2,1,0]) ], # map [ $_, join('', (/(..):(..):(..)/)[2,1,0]) ], # Is it possible to map two columns date and time? @dates; # DD-MM-YYYY # HOURS:MIN:SEC