http://qs1969.pair.com?node_id=926332


in reply to Demarcate Regexes with Unicode

One lamented aspect of Perl is that regexes get really hard to read. ....

If you learn to regex, they're really easy to read :)

why not use a sigil ...

Because its not on the standard keyboard!

Also, its a delimiter not a sigil

Which is why I prefer to use @ for quoting like s@@@ </sarcasm>

But seriously, this is exactly why i prefer \ or

$ perl -MO=Deparse -e " s\\\g " s///g; -e syntax OK $ perl -MO=Deparse -e " sg " s///g; -e syntax OK
or even </sarcasm>

But seriously, between balanced delimiters like

perl -MO=Deparse -e " s {}//g " perl -MO=Deparse -e " s {}\\g " perl -MO=Deparse -e " s {}vvg " perl -MO=Deparse -e " s {}()g " perl -MO=Deparse -e " s {}[]g " perl -MO=Deparse -e " s {}<>g " perl -MO=Deparse -e " s<><>g "

I stick to keyboard characters

s///x
s===x
s,,,x
s!!!x
s~~~x
s>>>x
s}}}x
and the special case s'''x

The x means magic