Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Substring Syntax Check

by dragonchild (Archbishop)
on Sep 27, 2008 at 01:44 UTC ( #713974=note: print w/ replies, xml ) Need Help??


in reply to Substring Syntax Check

When parsing user input, I first look for a parser that someone else wrote, look at writing my own parser, and then I reach for regexes. I would never use split to handle user input.

Luckily, dates and times are something that have a lot of work put into them already. DateTime is always what I first reach for, but Date::Calc has several parsing routines that would work perfectly here. Date::Manip is the other date module on CPAN that is pretty good.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?


Comment on Re: Substring Syntax Check

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (13)
As of 2014-07-11 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (230 votes), past polls