What is the @. variable in perl?
It appears be a special, writeable global, and (surprisingly) does not interpolate in double-quoted strings:
use strict;
use warnings;
# Under 5.8, 5.10, 5.12, 5.14, and 5.16,
# the following lines produce:
@. = (3, 2, 1); # no error
print "@.\n"; # "@."
print @., "\n"; # "321"
eval 'my @.; 1' # Can't use global @. in "my" at (eval 1)
or die $@; # line 1, near "my @."
I couldn’t recall ever encountering it before, and didn’t see it in perlvar nor perldata.
perldoc perlvar states:
and
You are using a reserved name. You should not expect to be able to rely on any features.