http://www.perlmonks.org?node_id=1021888

szabgab has asked for the wisdom of the Perl Monks concerning the following question:

use strict; use warnings; use List::Util qw/reduce/; print reduce { $a * $b } 1..6;
Genetates the following warnings:
Name "main::a" used only once: possible typo at x.pl line 6. Name "main::b" used only once: possible typo at x.pl line 6.
OTOH
use strict; use warnings; print sort {$a <=> $b } 1..6;
does not generate the warnings. As expected. (running perl 5.14.2 and List::Util 1.27)

Why did the first example generate the warnings?
What is the recommended way to silence them?
Why is this not mentioned in List::Util?