my $r = qr/(?:u|uau|uauau| .... ufududufubudufufudufubudufu)/x; my $s = "a" x 1000000; $s =~ $r for 1..10;