orprint foreach @a if $a;
have to use do{...}, but foreach is a code block, why perl donot deduce from right to left.foreach(@b){ print } if $a;
In reply to why not listed foreach and if? by vincentaxhe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |