http://www.perlmonks.org?node_id=1019199


in reply to Re: Conditional regex
in thread Conditional regex

It does , you just can't have space ... otherwise you couldn't distinguish between some constructs

Further to Anonymonk's point: This is common. Eliminating the extraneous space around  ? in the example below allows this pedestrian regex to compile and work as expected.

>perl -wMstrict -le "print 'match' if 'xxx' =~ m{ ( ? : x ) }xms; " Sequence (? ...) not recognized in regex...