If you are able to upgrade to a newer version of Perl, starting with v5.10, you can use the smart match operator, eg:
use 5.010; my $ref = 7; if ( $ref ~~ [ 1 .. 8 ] ) { ... }
In reply to Re: Range Operator in If Statement
by kejohm
in thread Range Operator in If Statement
by mmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |