Because contrary to $_ and @_ it has no function
> I could swear I saw it somewhere once upon a time, or maybe not...
People are exploiting the side effect that it's a global and doesn't need to be declared.
> What is it???
The typeglob / symbol _ is global to allow the scalar and array slots $_ and @_ to hold magic.
The hash slot is undefined but still global and can be (ab)used for syntactic sugar.
Like
# No my/our %_ lives in main:: %_ = (a => 1, b => 2); # global variable in package main
See also this SO discussion https://stackoverflow.com/questions/36723739/undocumented-perl-variable#36724370
perldoc -v and perlvar should probably be expanded to show a generic explanation for such "reserved" special variables
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re^5: perldoc -lf anomaly (%_)
by LanX
in thread perldoc -lf anomaly
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |