Where do you get this definition of "special" from
They are special in the sense that they are used by some Perl builtins, but the scalar itself is just an ordinary scalar. You can check using Devel::Peek's Dump. (As shown.)
So you agree that at least those vars should raise a warning in this case?
No. Warning when a magical var is used as the loop iterator would issue far too many incorrect warnings. Most of the time, the fact that the aliased variable doesn't have the original magic is a good thing.
sub g {
for (qw( abc def )) {
# $ENV{PATH} didn't get changed.
}
}
sub f {
for (@_) {
# $_ now aliased to $ENV{PATH}
g();
}
}
f($ENV{PATH}); # A magical var