in reply to How to extract a row or column of two-dimensional hash

Don't try to “bum code” too much: there is no return-on-investment in that. The basic structure of this routine is going to be to loop through each person-ID, then inner-loop through each person's values, and within that nested loop test the value and use the key to populate a separate hash. It's going to be a dozen source-lines at most. So, just find a correct way to do it and don't worry about it being an elegant way to do it. “Correct” is always “elegant.”

Replies are listed 'Best First'.
Re^2: How to extract a row or column of two-dimensional hash
by PerlKitten (Novice) on Jan 11, 2008 at 20:32 UTC
    Thank you for the quick response. I know that I can use a foreach loop, and that's how I've been doing it so far. But, for future reference, if I want to refer to a row of a hash in grep, how would I do it? Or alternatively, what would be the syntax for assigning the row of the two dimensional hash to a new variable (itself a one dimensional hash).