in reply to Re^3: eval a reference to a my hash
in thread eval a reference to a my hash

And that explains why making them our variables fixes the problem. Many thanks (I'm using an extra hash now and got rid of the eval, but it is worth knowing).
Cheers