in reply to range comparison in given
given( $x ){ when ([2..5]) { ...; } when ([6..10]) { ...; } default { ...; } }
Bear in mind that as of Perl 5.18, given/when has been marked experimental (and issues warnings) because it may undergo major changes in a future version of Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: range comparison in given
by mrguy123 (Hermit) on Jul 10, 2013 at 10:45 UTC | |
by tobyink (Canon) on Jul 10, 2013 at 15:35 UTC | |
by ww (Archbishop) on Jul 10, 2013 at 13:58 UTC |