in reply to using the define option
Arrays cannot be tested for defined(), only scalars can.
Arrays can be tested for emptiness, as:
# the scalar of an array is its number of elements if ( scalar(@array) ) { ... } # or equivalently, and shorter # exactly the same thing, since 'if ()' forces scalar context if ( @array ) { ... }
dmm
Just call me the Anti-Gates ...
|
|---|