"if ()" imposes a scalar context.
Actually it imposes a boolean context, which is basically the same as scalar context.
"if (@found)" sees undef or zero
An array in boolean context cannot be undef. In fact, defined doesn't work with arrays anymore.
In reply to Re^4: IF and GREP Question
by jwkrahn
in thread IF and GREP Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |