I am trying to remove line wrapping from files that contain something like this:sub zapwrap { my ($line, $next_line) = (@_); return undef unless $line =~ /^#(#|=)+$/; return undef unless $next_line =~ /(?:$1)+/; return 1; }
(hopefully your browser will have wrapped that line). I think I have the RE for it, I just sort of thought this one up. My question is whether in the second one, I have to ?: (forget) the saved value or if the $1 gets interpolated _before_ the value of that expression gets evaluated. It seems silly in that it has to interpolate it before it can evaluate it, but I suspect something strange might happen in the internal workings of the PCRE. :)###################################################################### +######################## # or ... #===================================================================== +========================
thanks
brother dep.
--
Laziness, Impatience, Hubris, and Generosity.
In reply to Regexp syntax nuance question, storing $1 (code) by deprecated
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |