in reply to In a dereference nightmare!

\{hash => \{}} is a reference to a reference to a hash. This probably isn't what you want (i.e. you now have a reference to a scalar which contains a reference to a hash). {} is the anonymous hash ref constructor, there's no need to use \ to take a reference. Read perldoc perlreftut and perldoc perlref a bit more.