in reply to Scoping Problem? - 'Use of uninititiated value...'

It would be useful to use Data::Dumper and dump %hash with it. It may suggest if you have built %hash well (=as you wanted) or not (as you probably reference non-existing key).