Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Regular expression for date

by didess (Sexton)
on Aug 25, 2008 at 21:11 UTC ( [id://706783]=note: print w/replies, xml ) Need Help??


in reply to Re: Regular expression for date
in thread Regular expression for date

Apologizes : The previous script hanged on bad date, this one runs better (thanks to "eval") !
use Time::Local timelocal; my ($m,$d,$y,$t); do { my ($date); print "date (MM-DD-YY) ? "; $date=<>; chomp($date); ($m,$d,$y)=split(/-/,$date); $m -= 1; $y += 1900; $t = eval "timelocal(0,0,0,$d,$m,$y)"; } until (!$t);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-19 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found