Hashes accept barewords in their braces and treat them as the keys. Perl interprets your line
delete $ENV{_}
just like it treats the next line:
print "$ENV{FOO}\n";
There is little way around that because the second usage is quite common. You could potentially set up some policy for Perl::Critic to prohibit/flag usage of bare hash keys that do not start with [A-Za-z] or something like that. Perl more or less considers everything matching /\s*\w+\s*/ as a valid bareword hash key (he says without checking).
In reply to Re: Why did this error slip through?
by Corion
in thread Why did this error slip through?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |