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

Re: Null in Array

by mpd (Monk)
on Jul 29, 2003 at 02:22 UTC ( [id://278698]=note: print w/replies, xml ) Need Help??


in reply to Null in Array

Checking the length seems to be a waste. Just test the variable directly w/ a regexp. I might do something closer to:
print (($day[5] =~ /^\d{2}:\d{2}:\d{2}$/) ? $day[5] : '00:00:00');
NB: TMTOWTDI. Code is untested. Regexp used may not be correct, but it's tough to tell without context.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found