Well, this is how you configure IIS to change the timeout. If this isn't at all an option you could break the script up into several smaller (hopefully faster) scripts.
Update: Why was this node reaped? He asked how to do something in Perl, it couldn't be done in Perl (to my knowledge), so the post gets deleted?