Thanks ww. My Active State version of Perl is 5.10.1. Unfortunately I'm stuck there owing to company policy. (Yes, we've still got one machine running Windows 98.) I think the Perl version could be at the root of the problem I was having. I was wrong when I said I also had this problem in Strawberry Perl: that's at a later version (5.18.2) and it doesn't exhibit this problem.