@+ magic variable
Luis Motta Campos
luismottacampos at yahoo.co.uk
Thu Feb 15 16:10:51 GMT 2007
On Feb 15, 2007, at 4:22 PM, Simon Wilcox wrote:
> On Thu, 15 Feb 2007, Luis Motta Campos wrote:
>> Of course not.
>> You're interpolating an (empty) array named @+, that is not
>> special, but stills an array.
>> I don't see any reason for perl warnings annoyance.
>
> Paul's original point is that it behaves differently on 5.6.1 from
> 5.8.4.
>
> In 5.6.1 s/@+$// appears to match a literal @ when we'd expect it
> not to.
>
> Note that @+ is a special variable according to perlvar.
But it will get interpolated into the regex even if it's not,
there is a "variable name" in front of it, no? I mean, it doesn't
matter if @+ is special variable or common variable, it will get
interpolated into the regex anyway, no?
--
Luis Motta Campos is a software engineer,
perl fanatic evangelist, and amateur {cook, photographer}
More information about the london.pm
mailing list