in reply to Sort by Date and Time
Generally speaking, if you're making numerous changes to a string, $_ helps. And you can clarify by choosing a delimiter that isn't in your string, so you don't have to escape it.
foreach (@dates) { s|^\s+||; #remove leading space s|\s+$||; #remove trailing space s|\s|/09 |; #add the year s|-|/|; #change - to / ... }
But the other responses are better...
|
|---|