in reply to Re^3: DBI fetchall_hashref convert to scalar
in thread DBI fetchall_hashref convert to scalar

http://search.cpan.org/~smueller/Data-Dumper-2.154/Dumper.pm#Configuration_Variables_or_Methods Style 0 spews output without any newlines, indentation, or spaces between list items. It is the most compact format possible that can still be called valid perl.

  • Comment on Re^4: DBI fetchall_hashref convert to scalar

Replies are listed 'Best First'.
Re^5: DBI fetchall_hashref convert to scalar
by stevieb (Canon) on Feb 03, 2017 at 00:58 UTC

    Right, but it's just nice when commenting that one provides an example within their reply, so it's easy to see, and one doesn't need to travel off the page unless they need to further their understanding of the documentation. Also, it doesn't 'quite' print it out in as compact format possible to be considered Perl... there's still some whitespace/characters that can be eliminated so the Golfers can remain happy ;)

    perl -wMstrict -MData::Dumper -E '$Data::Dumper::Indent=0; print Dumpe +r {a=>1, b=>2};' $VAR1 = {'a' => 1,'b' => 2};