use List::MoreUtils qw( all ); if (all { /abcdefgh/ } $var_a, $var_b, $var_c) { ... }