For such tasks, I prefer using Storable. If you want to dump your hash(-references) in a human readable format, I like to use Data::Dump or Data::Dumper (if you don't use circular references).
Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"