in reply to Re^2: Filehandler Trouble
in thread Filehandler Trouble

Try this:

print LOG "foo" or die "Unable to print: $!"; close LOG or die "Unable to close: $!";

-sam

Replies are listed 'Best First'.
Re^4: Filehandler Trouble
by tc1364 (Beadle) on Dec 14, 2004 at 22:07 UTC
    Both lines were added and there were no errors being reported but the "foo" didn't get printed into the log file. The last verbage that gets printed is in the below foreach loop. After this section of code it starts making an Excel spreadsheet.
    upd_hash(\%ca, \@ca); upd_hash(\%nv, \@nv); print LOG "$time Completed Processing West XLS Data For $report\n" +; }
      Are you sure the code is being reached? Try sticking this just before the print:

         die("HERE I AM!");

      Now your code should die and you'll know that the line is being reached. Alternately you could pop into the debugger and obtain the same information.

      -sam