/x apparently has no effect. \Q is what affects the space (for \Q implies to quote any characters following it, till the end or upto \E if present).
# Need perl to be built with DEBUGGING perl -Dr -e '$p = qr{\Q ++ \E} ; $q = qr{\Q ++ \E}x ; $r = qr{\Q++\E}' Compiling REx `\ \+\+\ ' size 3 Got 28 bytes for offset annotations. first at 1 rarest char + at 1 1: EXACT < ++ >(3) 3: END(0) anchored " ++ " at 0 (checking anchored isall) minlen 4 Offsets: [3] 1[8] 0[0] 9[0] Compiling REx `\ \+\+\ ' size 3 Got 28 bytes for offset annotations. first at 1 rarest char + at 1 1: EXACT < ++ >(3) 3: END(0) anchored " ++ " at 0 (checking anchored isall) minlen 4 Offsets: [3] 1[8] 0[0] 9[0] Compiling REx `\+\+' size 3 Got 28 bytes for offset annotations. first at 1 rarest char + at 0 1: EXACT <++>(3) 3: END(0) anchored "++" at 0 (checking anchored isall) minlen 2 Offsets: [3] 1[4] 0[0] 5[0] Omitting $` $& $' support. EXECUTING... Freeing REx: `"\\ \\+\\+\\ "' Freeing REx: `"\\ \\+\\+\\ "' Freeing REx: `"\\+\\+"'
I consulted perlre to see if there was anything about a space with \Q & /x. Finding nothing there, I moved to the pointer provided to Gory details of parsing quoted constructs in perlop. That section also did not list anything about the topic. The reading of that section, however, was interesting. All was not in vain.
In reply to Re: /x modifier with \Q and \E
by parv
in thread /x modifier with \Q and \E
by wardy3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |