If, by 'null' and 'blank', you mean undef, note that length undef is zero. That's also true of the empty string, ''. This may work for you,
or just, print length($day[5])? $day[5]: '00:00:00'; See trinary op, ?:, in perlop.if (length $day[5]) { print $day[5]; } else { print '00:00:00'; }
After Compline,
Zaxo
In reply to Re: Null in Array
by Zaxo
in thread Null in Array
by Pyramid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |