/usr/src/perl/pod/perlfaq4/How_do_I_kep_persistent_data_ac.pod

How do I keep persistent data across program calls?

For some specific applications, you can use one of the DBM modules. See the AnyDBM_File manpage. More generically, you should consult the FreezeThaw, Storable, or Class::Eroot modules from CPAN.