Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Out of Memory after file open for appendby pjf (Curate) |
on Oct 08, 2001 at 12:39 UTC ( [id://117420]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|