in reply to Using IF and OR, I'm sure there is a better way
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 } ) { # . . . }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using IF and OR, I'm sure there is a better way
by mrborisguy (Hermit) on Dec 15, 2005 at 02:41 UTC | |
by Fletch (Bishop) on Dec 15, 2005 at 15:08 UTC |