in reply to Getting the Value of a single hash key

($value, $key) = split(/=/, $line);
Since the key is usually on the left side of the equal sign, shouldn't that be:
($key, $value) = split(/=/, $line);
I changed that line and your code worked for my test case.

UPDATE: regarding your reply below, please show us what your data looks like. That is, what are the contents of the F filehandle?

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: Getting the Value of a single hash key
by Anonymous Monk on May 06, 2003 at 19:42 UTC
    I know, but the file I have is formatted value=key. So that is correct. The problem is that I get this output:
    NOT: ARRAY(0x1a99a98) != Source1 NOT: ARRAY(0x1a752ec) != Source2 NOT: ARRAY(0x1a99a98) != Source3
      You may be building your hash incorrectly, because it looks like the values are array references. Could you post that code?