use strict; use Set::IntSpan; + my $set = new Set::IntSpan('1-4,6,9,12-18'); testvalue(3, $set); testvalue(7, $set); + sub testvalue { my $value = shift; my $set = shift; if (member $set $value){ print "$value is valid\n"; }else{ print "$value is invalid\n"; } }
In reply to Re^3: Set Notation Handling
by tall_man
in thread Set Notation Handling
by tradez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |