in reply to Re: Question about regex.
in thread Question about regex.
"local $/="";
"If you wanted to format your regex nicely and have whitespace ignored, you could use the /x modifier"
Anyone else feel a dissonance here? I'd format the assignment (yes, it is an assignment) as:
local $/ = "";
On first glance the assignment looks like $/= "" to me and that's not right. An eye blink later it turns into $ /= "" which doesn't work either. It's only after two glances and a hard look that it resolves into $/ = "";. Using white space to reduce cognitive load is a Good Thing™
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Question about regex.
by haukex (Archbishop) on Sep 29, 2020 at 20:32 UTC | |
by GrandFather (Saint) on Sep 30, 2020 at 00:45 UTC | |
by haukex (Archbishop) on Sep 30, 2020 at 07:17 UTC | |
by hippo (Archbishop) on Sep 30, 2020 at 09:03 UTC | |
by haukex (Archbishop) on Sep 30, 2020 at 09:59 UTC |