On 6/30/21 6:22 AM, Nicholas Clark wrote: > On Wed, Jun 30, 2021 at 06:18:13AM -0600, Karl Williamson wrote: > >> $ blead -Dr -le "qr'$foo'm" >> Compiling REx "" >> Final program: >> 1: NOTHING (2) >> 2: END (0) >> minlen 0 >> Enabling $` $& $' support (0x7). > > I think that your Unix shell quoting is not doing you favours here. > > I think that for this examples the shell will replace $foo with an empty > string, as the shell is processing the "" quotes. So you perl one-liner > is not what you intended. (I believe). > > And in the other, \$ is processed by the shell, not perl's parser. > > Nicholas Clark > Sorry. Hopefully this is better § cat nwc.pl qr'$foo'm; qr'\$foo'm; § blead -Dr nwc.pl Compiling REx "$foo" Final program: 1: MEOL (2) 2: EXACT <foo> (4) 4: END (0) anchored "foo" at 0..0 (checking anchored) minlen 3 Compiling REx "\$foo" Final program: 1: EXACT <$foo> (3) 3: END (0) anchored "$foo" at 0..0 (checking anchored isall) minlen 4 Enabling $` $& $' support (0x7).Thread Previous | Thread Next