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


in reply to running Perl scripts in the background

I could imagine Storable] is your friend.
If you store your script's state in one object, it should be quite easy to save this object to disc and restore it later.

Assuming your pc could die while writing to the file, it would also be useful to use some rotation system for storing your object.
Perhaps it would be enough to sequentially store into two different files, syncing the filebuffers after writing.