On Wed, May 08, 2013 at 01:47:48AM -0400, Eric Brine wrote: > 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 Knowing how the implementation has to handle the mutli-character numeric variables specially (well, differently specially) this doesn't actually surprise me. (Regular identifiers start with a number. Punctuation variables are one character. Control character variables start with a control character. The sequence "10" is none of these.) Still, I agree with Dave that it feels like a bug. It suggests that the differently-special code needs to be added in yet another place. Nicholas ClarkThread Previous