in reply to Re^2: How best to replicate/copy a hash of hashes
in thread How best to replicate/copy a hash of hashes

I found that it put a '\n' between the key and data in the cloned hash

That can only be an artifact of the way you are inspecting the cloned hash, because Clone::clone() adds nothing:

use Clone qw[ clone ];; my $n = 0; my %hash = map{ $_, ++$n} 'a' .. 'e';; pp \%hash;; { a => 1, b => 2, c => 3, d => 4, e => 5 } my $copy = clone \%hash;; pp $copy;; { a => 1, b => 2, c => 3, d => 4, e => 5 }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^4: How best to replicate/copy a hash of hashes
by flexvault (Monsignor) on Oct 04, 2010 at 19:24 UTC

    I stand corrected.

    I re-ran the test, and the raw output did not have the '\n'. But when I ran a numeric unix 'sort' on the raw file, it added a '\n' after the '\t' that I used to separate key and data. There are a lot of parms for sort, so I'm sure I need to add something

    But Clone didn't do it!

    Thank you

    "Well done is better than well said." - Benjamin Franklin