in reply to Re^2: Using Look-ahead and Look-behind
in thread Using Look-ahead and Look-behind

Thank you very, very much for setting me on the right path! While (in my environment) the -g switch isn't allowed for (what I learned to be was) slurping, instead using the -0777 switch did work nicely. I had seen this switch before, but until now wasn't aware of its usage until I dug deeper, prompted by your input.

I was stuck on this for a long time - thanks again for the quick response!

P.S. I just found where version 5.36 would allow the use of the -g switch, which is apparently a shortcut for using -0777.

Replies are listed 'Best First'.
Re^4: Using Look-ahead and Look-behind
by hippo (Archbishop) on Nov 28, 2024 at 14:06 UTC

    The -g only came in with perl 5.36 so won't be available in many LTS platforms unless they backport it. Using -0777 as you have mentioned is perfectly fine and, AFAIAA, will continue to be.


    🦛