I am unaware of a way this can be done easily in Perl. Maybe there is something available in Javascript, or a Microsoft scripting language, however. Have you tried looking at the
Microsoft Developer Network for more information on this?
If that fails, then maybe you should snoop around or post a message to the newsgroup
microsoft.public.internetexplorer.scripting. Good luck!
- wil