Re: What should /\08/ match and do?

[email protected] (demerphq)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On 1 June 2010 22:30, Abigail <[email protected]> wrote:
> On Tue, Jun 01, 2010 at 11:52:38AM -0600, karl williamson wrote:
> This one is sneaky as well:
>
>    $a = '(.)\1';
>    "aa" =~ /${a}/;      # True
>    "aa0" =~ /${a}0/;    # False!
>    "aa\x8" =~ /${a}0/;  # True!

Wow. Those are gnarly.  Thats a great example of why using old style
back refs is dangerous. Might even be worth adding to the docs?

Thanks Abigail, that is a much better example than I came up with.

Cheers,
yves



-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.