@+ magic variable

Rafael Garcia-Suarez rgarciasuarez at gmail.com
Thu Feb 15 15:01:57 GMT 2007


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.


More information about the london.pm mailing list