Win7 x64, Arduino Uno: com port gets disabled after use

emprolus:
I was about to test it but then I realized the bug is in the sketch, after all.

I suspect you are a bit too hasty to declare victory.

One more question. I issue the serial commands from a Perl script. It seems that Arduino's Serial Port Monitor and my Perl script don't play along. That is, if I use the Serial Port Monitor, I can access the serial port as much as I want. But once I've quit out of the Monitor the port becomes inaccessible to my Perl script.

The symptoms you have described, including the one above, indicate a hardware related problem. My suspicion is that your Uno + relay board are consuming more power than your USB port can safely provide.

I suggest you reconsider Reply #3. If I am correct and you do not reconsider, you could permanently damage your Uno or even your computer. If I'm wrong the price you pay is fairly small.