if ( $a eq 'abcdefgh' or $b eq 'abcdefgh' or $c eq 'abcdefgh') { } #### if ( $a =~ /abcdefgh/ || $b =~ /abcdefgh/ || $c =~ /abcdefgh/ || ....... ) { } #### my $USER_NAME = qr{abcdefgh}xms; if ($a =~ $USER_NAME || $b =~ $USER_NAME || $c =~ $USER_NAME) { }