in reply to problems opening logfile

I doubt that having -w on the command line or not is the cause for Perl being unable to open the file. But Perl tells you why it couldn't open a file in the $! variable:

open(LOG, $file) or die ("\n\tPFAD/FILENAME FALSCH ? \n\nLogfile konnt +e nicht geoeffnet werden: $!"); #$file öffnen

Some stylistic notes:

Replies are listed 'Best First'.
Re^2: problems opening logfile
by m0ve (Scribe) on Aug 10, 2007 at 09:25 UTC
    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': $!";

      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...