in reply to Re: global vars and one liners
in thread global vars and one liners

Or maybe just ditch the  -n command line switch altogether:
>perl -wMstrict -le "for (<>) { /(\w+)/; $::i{$1}++ } print qq{$_ $::i{$_}} for keys %::i " words2.txt bar 2 baz 2 qux 2 foo 3