What version of perl are you using? I think this case got a heavy speed up in 5.10. How does your data look like? How many matches are there in each case? Can it be that the optimizer decides "no match" for the 00901808 case, while it cannot do that for 87654321? How does /00901808/ || /87654321/ perform?