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


in reply to Name "main::a" used only once: possible typo

One way to silence the warnings is to disable them in a localized scope:
use warnings; use strict; use List::Util qw/reduce/; { no warnings qw(once); print reduce { $a * $b } 1..6; }

Update: added "once"

Update: Refer to the following discussion: https://rt.cpan.org/Public/Bug/Display.html?id=65629