You might also consider populating a hash and using exists to check for a match.
use YAML (); $items = YAML::Load( <<EOT ); a: 1 b: 1 c: 1 EOT if( exists $items->{ $variable } ) { # . . . }
In reply to Re: Using IF and OR, I'm sure there is a better way
by Fletch
in thread Using IF and OR, I'm sure there is a better way
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |