$key2value is a hash reference, you retrieve the value for a this way: $key2value->{a}
see perldata for more info.
| [reply] [d/l] [select] |
I had tried that at first and it does print the value, but it also prints:
Use of uninitialized value $key2value{"a"} in concatenation (.) or string
for each "settings" element in the xml.
| [reply] |
$key2value{"a"} and $key2value->{"a"} are two different and absolutely unrelated things. The first attempts to get the value of the key "a" in hash %key2value, the other in the hash referenced by the scalar variable $key2value. Two different variables, no surprise that you do not find anything in one after you wrote to the other.
Jenda
Enoch was right!
Enjoy the last years of Rome.
| [reply] [d/l] [select] |
mirod used a key called "key", if you want a key called "a", maybe you should replace "key" with "a" or something like that, I haven't read perlintro so I'm not sure
| [reply] |