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:
NB: TMTOWTDI. Code is untested. Regexp used may not be correct, but it's tough to tell without context.print (($day[5] =~ /^\d{2}:\d{2}:\d{2}$/) ? $day[5] : '00:00:00');
|
---|
In Section
Seekers of Perl Wisdom