use Data::Dumper::Simple; my $Dump => new Data::Dumper::Simple( Output=>"warn", # or "print" # or: Output=\&CodeRef vars=($this,%that,@other) }; $Dump->() ; # Can't think of appropriate syntax here.. # Line above would do the equivalent of print Dumper ($$this,%that,@other); # If we no longer want to output %that, do $Dump->Removevars(%that); # or even $Dump->Addvars(@Something_Else);