in reply to save hash to file?

I would use a human-readable format to store my data, e.g. JSON.

See also this discussion on stackoverflow.com for a comparison of YAML, JSON, XML, Storable.

--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]