in reply to error using FileHandle Module

You're assuming the new file handle has been created. Try adding a die to it.

my $fh = FileHandle->new(">> $LOG") or die $!;

What error does that give you?

Replies are listed 'Best First'.
Re^2: error using FileHandle Module
by apl (Monsignor) on Dec 16, 2010 at 11:17 UTC
    Minor nit:

    my $fh = FileHandle->new(">> $LOG") or die "$! opening '$LOG'";

      I tried my own code on different directory say '/tmp'. Problem is with I don't have proper permissions to create the LOG from the Perl script.

      Thanks for all the efforts