On my win2k box there's a "redial if line is dropped" (or similar wording) checkbox in the advanced DUP settings. you should check there first - no need to write a perl script to do something the OS already does!
"Argument is futile - you will be ignorralated!"