in reply to Too much SQL not enough perl
if( grep $question eq $_, 'a', 'b' 'c' ) { # ... }
Or, depending on what you're doing,
my %questions; undef @questions{ 'a', 'b', 'c' }; # and then if( exists $questions{ $question } ) { # ... }
Update: s/==/eq/ per thor’s notice.
Makeshifts last the longest.
|
|---|