Well, if you're confident that you can read in just the hash definition -- say into an array -- and that you're sure that there's no way that this would end up being tainted maliciously, you can use join to get it all into one string and then eval to execute it.