in reply to Program hanging after reinstall

You might want to see what other processes are running at the same time. It sounds like you may have a conflict between something your script does, and some program that gets started, possibly automatically. You should also consider adding use strict; and use warnings;, because they may offer you some guidance as to what's going wrong.