Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Out of Memory after file open for append

by pjf (Curate)
on Oct 08, 2001 at 12:39 UTC ( [id://117420]=note: print w/replies, xml ) Need Help??


in reply to Out of Memory after file open for append

Having a bit more of your program (like the lines between that open and the strftime line) would probably help, as both the lines that you've listed are fine, and there are many things that could potentially chew up all your memory. Common things are slurping an entire very large file, infinite recursion, or building an incredibly big list with something like (1..1000000000).

On a completely different track, the '%D' format for strftime prints the date in MM/DD/YYYY format, which is great if you're in America, but terribly confusing in many other places in the world (such as Europe or Australia). It also uses a 2-digit year, and we all know how much trouble people got into for using that last century.

If you wish to have an unambiguous, internationally readable date, then "%Y-%m-%d" is highly recommended.

As a different aside, evaluating localtime() in a scalar context also returns an unambiguous, human readable date.

Cheers,
Paul

  • Comment on Re: Out of Memory after file open for append

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-19 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found