in reply to Re: Help on variable declaration with "use strict "
in thread Help on variable declaration with "use strict "

It was hard to spot. The reason it's a strict error is that
use Data::Dumper my %count;

is the same as

BEGIN { require Data::Dumper; import Data::Dumper my %count; }

The curlies of the implicit BEGIN limited the scope of the lexical.