in reply to Exiting batch-started Perl script on WinXP shutdown

I would run DoSomething as a windows scheduled task. On XP, you can access the scheduler as Start->Programs->Accessories->System Tools->Scheduled Tasks