Used in this way, @array2 returns its size. So, you can write tests like this:if (@array2) { # array2 is not empty } else { # array2 is empty }
The first test is short-hand for if (@array2 != 0) { ....if (@array2 > 3) { # array2 has more than three elements }
In reply to Re: grep and arrays
by pc88mxer
in thread grep and arrays
by purple.mojo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |