in reply to Using IF and OR, I'm sure there is a better way
use feature '~~'; if ($variable ~~ [1,2,3]) { ... } [download]
(I'm backporting the Perl 6 "smart match" operator to Perl 5.)