use warnings; use strict; use 5.10.1; my @matches = ( qr/pattern1/, qr/pattern2/, ); if( $_ ~~ @matches ){ ... }