use Regexp::List (); $EXEC_block = Regexp::List->new->list2re(@EXEC_block); ...