$_ = 'abcdefghijk'; my($left) =1; $left ? /ab(..)ef/ : /gh(..)jk/; print "Caught $1\n"