http://www.perlmonks.org?node_id=135164

Q&A > input and output > Reading Variables from a File - Answer contributed by gav^

use Storable; store \%hash, 'data'; $hr = retrieve 'data';