in reply to Re^5: array in hashes
in thread array in hashes

There's no need for the additional blocks. Writing $genome1{$_}[1] instead of ${$genome1{$_}}[1] is just fine.

Replies are listed 'Best First'.
Re^7: array in hashes
by AnomalousMonk (Archbishop) on Jul 29, 2011 at 15:37 UTC

    Further to JavaFan's point about clarity, there's also no need to go overboard using concatenation for complex hash or array values in a string. They will interpolate just fine:

    >perl -wMstrict -le "my %hash = ( a => [11,22], b => [33,44], ); my $hashref = { c => [55,66], d => [77,88], }; ;; print qq{$hash{a}[0] $hash{b}[1] $hashref->{d}[1]}; " 11 44 88
Re^7: array in hashes
by fisher (Priest) on Jul 29, 2011 at 14:02 UTC
    Yes, I know. I wrote this for clarity.
      Clarity? 3 extra, not-needed, punctuation characters that hardly anyone ever use?

      I fail to see why that brings clarity, or who benefits from it.