in reply to require and use strict vars

$Data::Dumper::Indent is fully qualified , you don't need resp. can't declare it.

Workarounds:

D:\tmp>perl use strict; use warnings; eval <<'__CODE__'; use Data::Dumper; $Data::Dumper::Indent = 0; __CODE__ __END__ D:\tmp>

update

Full demo:

NB: in order to use Dumper w/o parens or leading '&'-sigil you will need to declare it at compile time with subs

D:\tmp>perl use strict; use warnings; #use subs qw/Dumper/; eval <<'__CODE__'; use Data::Dumper; $Data::Dumper::Indent = 0; __CODE__ print Dumper( [map {{$_=>$a++}} "a".."d"] ); __END__ $VAR1 = [{'a' => 0},{'b' => 1},{'c' => 2},{'d' => 3}]; D:\tmp>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: require and use strict vars
by karlberry (Sexton) on Dec 02, 2021 at 18:44 UTC
    wow. would not have come up with that. thanks.