Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Sort by Date and Time

by hbm (Hermit)
on Feb 01, 2009 at 03:40 UTC ( [id://740500]=note: print w/replies, xml ) Need Help??


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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://740500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-26 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found