in reply to Re^3: how to set a value for a hash reference
in thread how to set a value for a hash reference

hmmm - I guess its a bit complicated because I"m just passing the entire hash reference to another script that writes the output in a nice matrix format. And I don't want to modify "write_R_matirx". any other suggestions?

use Smash::Utils::MatrixIO qw(:all); my $SMASH_overlap_file="$CDHIT_file.smash.overlap"; write_R_matrix($SMASH_overlap_file,$overlap);

Replies are listed 'Best First'.
Re^5: how to set a value for a hash reference
by moritz (Cardinal) on Mar 14, 2012 at 14:53 UTC

    Then you do need the initialization. You could write something along the lines of

    for my $a (@members) { for my $b (@memebers) { $overlap->{$a}{$b} = 0; } }

    before the other loop.