in reply to Re: Simple? problem accesssing elements in a hash
in thread Simple? problem accesssing elements in a hash

I found the error. Being told that it didn't look like a code problem and more like an input problem helped.

It was in the initialization of the PCA hash the keys, instead of being numbers, had quotation marks around them.

  • Comment on Re^2: Simple? problem accesssing elements in a hash

Replies are listed 'Best First'.
Re^3: Simple? problem accesssing elements in a hash
by tinita (Parson) on Aug 29, 2008 at 14:36 UTC
    and the general answer for this is:
    debug.
    print out variables, if you're not sure what's in it.
    and even if you're sure.
    use Data::Dumper; $Data::Dumper::Useqq = 1; # print non-printable chars warn Dumper $blackbox;
      I agree. Strings appearing with quotes around them are sneaky ones, though. In this case the answer was more obvious looking at the input files than the output statements.