in reply to Re: Data::Dumper print arrays of scalars on one line
in thread Data::Dumper print arrays of scalars on one line

Interesting. I didn't realize dump/pp would put different hash keys etc on the same long line because it my "real" case it printed like below. I guess it's because all of the contents of the 'cell' hash key didn't fit within the value of $Data::Dump::LINEWIDTH I used which was 640,000. However, I'm not sure why it decided not to put some of the other hash keys/values on the same line. I just tried it with 1,000,000 and it did print the whole structure on a single line like in your example. If you set $Data::Dump::LINEWIDTH = 10 in your example, it prints like your "new dump string". It looks like you can just play around with the LINEWIDTH until you get what you want.

EDIT: Regarding the comment "However, I'm not sure why it decided not to put some of the other hash keys/values on the same line.", it seems that if a particular item at a given level is deserving of its own line then all items at that level are.

{ active => 0, attr => [], cell => [ [], [undef, "Peptide Groups P> [undef, "Checked", "FALSE> [undef, "Confidence", "Hi> [undef, "Annotated Sequen> [undef, "Modifications", > [undef, "Qvality PEP", 6.> [undef, "Qvality q-value"> [undef, "# Protein Groups> [undef, "# Proteins", 1, > [undef, "# PSMs", 3, 6, 1> [undef, "Master Protein A> [undef, "Positions in Mas> [undef, "Modifications in> [undef, "# Missed Cleavag> [undef, "Theo. MH+ [Da]",> [undef, "Abundance: F667:> [undef, "Abundance: F668:> [undef, "Abundance: F669:> [undef, "Abundance: F670:> [undef, "Quan Info", unde> [undef, "Found in Sample:> [undef, "Found in Sample:> [undef, "Found in Sample:> [undef, "Found in Sample:> [undef, "Confidence (by S> [undef, "Percolator q-Val> [undef, "Percolator PEP (> [undef, "XCorr (by Search> [undef, "Top Apex RT [min> ], hidden => 0, label => "combined", maxcol => 29, maxrow => 3941, merged => [], mincol => 1, minrow => 1, parser => 0, }