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


in reply to Re^3: Name "main::a" used only once: possible typo
in thread Name "main::a" used only once: possible typo

I was just interested in more options.

This is kind of old-school and amounts to the same thing as sticking an  our ($a, $b); statement somewhere, but it's another option:

>perl -wMstrict -le "use List::Util qw/reduce/; use vars qw($a $b); ;; print reduce { $a * $b } 1..6; " 720