Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Re: Sorting Issues :(

by Masem (Monsignor)
on Jul 18, 2001 at 21:55 UTC ( [id://97797]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Sorting Issues :(
in thread Sorting Issues :(

Try this (in the regex...):
$time =~ /^(\d{1,2}):(\d\d)\s?([APM]{2})$/ #----------------------------^ Added this # And actually, now that I come to think of it, the # dealing with AM or PM problems may be better sorted using: $time =~ /^(\d{1,2}):(\d\d)\s?(AM|PM)$/

Note that you ought to use this regex after the user submits the data and before you enter it, so that if a user gives something bogus, you catch it then, before the data goes in, as opposed to afterwards during the sort.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

Replies are listed 'Best First'.
Re: Re: Re: Re: Sorting Issues :(
by LostS (Friar) on Jul 18, 2001 at 21:59 UTC
    Man one day I hope to be as well versed in perl as you. :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-23 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found