It only prints out '40', not '47' and '76'. Why does is the 'OR' not work there?#!/usr/bin/perl for (my $n = 0; $n < 268; $n++) { if ($n == (40||47||76)) { print $n."\n"; } }
In reply to my 'if' condition doesn't work, why? by perltux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |