Ignoring your stated question (mostly because you didn't providing enough code for me to easily replicate the problem), it seems like your main problem isn't eval and lexicals, it's the hideous design that requires you to use eval to create or access variables. If you really want dynamically named access to a chunk of data, use a hash, that's what its there for.