http://www.perlmonks.org?node_id=1025794


in reply to Re^2: Out of memory error!!!
in thread Out of memory error!!!

Where you have:

open(my $LOG,">>LOG_file") or die("Cannot open");

Change it to:

open(my $LOG,">>LOG_file") or die("Cannot open: $!");

This will display more information as to why you couldn't open the file. See open, perlvar and since you're new to perl:

Replies are listed 'Best First'.
Re^4: Out of memory error!!!
by McA (Priest) on Mar 27, 2013 at 19:38 UTC

    Better change it to:

    my $filename = 'LOG_file'; open(my $LOG, '>>', $filename) or die("ERROR: Cannot open file '$filen +ame' for appending: $!");

    McA