Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Out of memory error!!!

by marto (Chancellor)
on Mar 27, 2013 at 19:26 UTC ( #1025794=note: print w/ replies, xml ) Need Help??


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:


Comment on Re^3: Out of memory error!!!
Select or Download Code
Re^4: Out of memory error!!!
by McA (Curate) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025794]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-09-02 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (21 votes), past polls