in reply to Re: Regex and \G
in thread Regex and \G

s!^((?: {8})+)!"\t" x length ($1) / 8!e;

Why would you want to replace leading chunks of spaces with "0" while generating a warning?

Yet another example of why we should have a few more levels in the Perl precedence table.

                - tye

Replies are listed 'Best First'.
Re: Regex and \G (oops)
by Abigail-II (Bishop) on Oct 23, 2003 at 14:45 UTC
    Why would you want to replace leading chunks of spaces with "0" while generating a warning?
    Because tabs are evil, and it's good that when there's an attempt to summon evil, warnings are generated, and harmless beings (the 0's) are send instead.

    Abigail