thx for the suggestions, i'll change that.
but as i said, the script works just fine without the -w
and as i need to learn perl i want to find out why ;)
The -w switch should not alter the behaviour of Perl, so please reduce your program to a small, self-contained program that exhibits the same behaviour.
Other than that, I can only recommend to use the following idiom:
open LOG, $file
or die "Couldn't open '$file': $!";