in reply to Re: problems opening logfile
in thread problems opening logfile

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 ;)

Replies are listed 'Best First'.
Re^3: problems opening logfile
by Corion (Patriarch) on Aug 10, 2007 at 09:27 UTC

    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': $!";

    which tells you both, the filename used and the reason why it failed. Maybe you have other programs writing to the file or something.

      i'll try that...