in reply to Re^2: how to print out a variable name and its value
in thread how to print out a variable name and its value

Dumper can be controlled by some attributes, read the man pages first! I, personally, like Data::Dump::Streamer better:
$ perl -e ' use Data::Dump::Streamer; my $firstname = "Edward"; my $var = 1; my @jack = ('a', '1', { b => 3, c => [1, 2]}); DumpLex($firstname, $var, \@jack)->Indent(0)->OptSpace(" ")->Out(); ' $firstname = 'Edward'; $var = 1; @jack = ( 'a', 1, { b => 3, c => [ 1, 2 ] } );
Or, if the vars aren't lexical,
$ perl -e ' use Data::Dump::Streamer; $firstname = "Edward"; $var = 1; @jack = ('a', '1', { b => 3, c => [1, 2]}); DumpVars(firstname => $firstname, var => $var, jack => \@jack)->Indent +(0)->OptSpace(" ")->Out(); ' $firstname = 'Edward'; $var = 1; $jack = [ 'a', 1, { b => 3, c => [ 1, 2 ] } ];
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^4: how to print out a variable name and its value
by parv (Parson) on Jul 31, 2008 at 02:08 UTC
    Mucho gracias. Else, I would have not been interested in the D'D'Streamer for D'D has been good enough for me.