in reply to Handle Ctrl-C on Windows

May I suggest that you call Storable::store() in your:

# some code here

processing on a regular basis? The problem with calling store() at random points is that the data structure you want to save may be in an inconsistent state. Storable::store is very efficient and so it is not a problem to call it frequently whenever you have made a consistent set of modifications to your data, perhaps, for example, at the end of your while loop. This would eliminate the need to catch the Ctrl-C in your code and so make your script simpler and more reliable.

Replies are listed 'Best First'.
Re^2: Handle Ctrl-C on Windows
by cztmonk (Monk) on Aug 29, 2012 at 06:54 UTC

    I have decided to do just that. I thank you for the reply.