in reply to howto make a very long IF statment shorter

foreach ($a, $b, $c) { next unless /abcdefgh/; ... last; }

or

if (grep /abcdefgh/, $a, $b, $c) { ... }

or (Update)

use List::MoreUtils qw( any ); if (any { /abcdefgh/ } $a, $b, $c) { ... }

The grep solution is easier to read than the foreach solution, but it has the disadvantage of always executing the regexp for every item in the list. The foreach and the any solutions execute the regexp as few times as possible.