in reply to Warning about unused lexical variables

At first glance it sounds like a great idea. And it is to a certain extent. But there is an existing system in Perl that does that very thing, although only with global variables.

[paul@paul-laptop nqp]$ perl -we '$x = 1' Name "main::x" used only once: possible typo at -e line 1.

Speaking from experience, this warning has never helped me. It has done the opposite. It has always been a hinderance. It has forced me to write things similar to the following:
my $value = $SOME_PKG::SOME_VAL || $SOME_PKG::SOME_VAL; # warn clean
Arguably, I should have a function in SOME_PKG that returns the value of $SOME_VAL. But there are many existing modules that don't provide accessors.

Use strict catches all of my typos. A warning of this sort never has.

Still - I could see a use for it, but I think I'd want it as an extra-extra pragma:
use warnings qw(single_use_vars);


my @a=qw(random brilliant braindead); print $a[rand(@a)];