my @matches = ( qr/abcdef/, qr/abfdef/,#for simplicity, limited to 2 choices ); if ($line ~~ @matches){ ... }