@+ magic variable

Luis Motta Campos luismottacampos at yahoo.co.uk
Thu Feb 15 15:25:42 GMT 2007


On Feb 15, 2007, at 4:01 PM, Rafael Garcia-Suarez wrote:
> On 15/02/07, Luis Motta Campos <luismottacampos at yahoo.co.uk> wrote:
>> > my $str='padding@@@';
>> > $str =~ s/@+$//g;
>> > print "$str\n";
>>
>>    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.
>
> [rafael at stcosmo ~]$ perl -we '/@x/'
> Possible unintended interpolation of @x in string at -e line 1.
>
> (warning issued for undeclared variables, to protect against typos).
> But punctuation variables don't fall in this category, they're not
> subject to strictures.

   Even the non-magic, non-bounded ones, Rafael?

--
Luis Motta Campos is a software engineer,
perl fanatic evangelist, and amateur {cook, photographer}




More information about the london.pm mailing list