in reply to Is there a way to reduce Data::Dumper's output size?

Looks like you want JSON. Or anything else. I wouldn't use DD for serializing.

But you could use

local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1;

Don't use Terse you can you don't have two references to the same variable.