develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #117907] On RHS of s///, ${9} works but ${10} does not

Thread Previous | Thread Next
From:
Eric Brine
Date:
May 8, 2013 05:47
Subject:
Re: [perl #117907] On RHS of s///, ${9} works but ${10} does not
Message ID:
CALJW-qGBnFUSdWDakW1d=7qomDg8TVCpfw5KG5DbAzCeuP+ASA@mail.gmail.com
On Tue, May 7, 2013 at 10:35 AM, Dave Mitchell <davem@iabyn.com> wrote:

> $ perl589 -e'use strict; $9; ${9}; $10; ${10}'
> Can't use string ("10") as a SCALAR ref while "strict refs" in use at -e
> line 1.
>
> I don't know if there is any rationale behind this, but a first glance it
> indeed seems like a bug.
>

No other type of variable seems to generate a strict error.

>perl -E"use strict; my $xyz; ${xyz} = 1; say 'ok'"
ok

>perl -E"use strict; my $xyz; ${^I} = 1; say 'ok'"
ok

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About