in reply to uninitialized value loading into hash and printing
That's because the key you have in the hash is qq{"andrew"\n}, not qq{andrew}.print $some_new_hash{"andrew"}; # Causes Error
You would need something like:
which would lose the newlines and the double quotes of each line read from the file before being put into the hash.%some_new_hash = map {chomp; s#^"##; s#"$##; $_} <DATAFILE>;
Hope this helps.
Liz
|
|---|