in reply to Can't get a simple log creator to work!

What do you think if (! open LOG ) {die "cannot create link to logfile: $!";} does?

Replies are listed 'Best First'.
Re^2: Can't get a simple log creator to work!
by aquinom85 (Initiate) on Feb 23, 2010 at 05:17 UTC
    tells the program that if the filehandle LOG fails to initialize to print the error message
      tells the program that if the filehandle LOG fails to initialize to print the error message
      May I ask you where you get this idea?

      If you want to know whether the open failed, you need to check the return code of the open function which you used to open the file. If it is false (i.e. undef, 0 or ''), the error message can be found in "$!".

      -- 
      Ronald Fischer <ynnor@mm.st>