use List::MoreUtils; if (any { $variable == $_ } (1, 2, 3)) { ... }