in reply to Exiting batch-started Perl script on WinXP shutdown
Shouldn't the script be receiving a signal when windows shuts down?
Using %SIG to set an appropriate action (cleanup; exit 0) might be the simplest way to go about this.
In Section
Seekers of Perl Wisdom