No such thing as a small change | |
PerlMonks |
How can you check to see if a file handle is already open?by agent_smith (Scribe) |
on Jan 16, 2008 at 16:00 UTC ( [id://662700]=perlquestion: print w/replies, xml ) | Need Help?? |
agent_smith has asked for the wisdom of the Perl Monks concerning the following question:
Good Morning Esteemed Bretheren, I have a question on checking to see if I have already opened a file handle, and if so just go ahead and write to it, don't try to re-create it. I have a dataset that looks like:
I want to open files based on the date, write that line to that file, and not open unnecessary files for dates that do not exist. ie..
I also don't want to be opening and closing file handles for every line. Is it necessary to explicitly close all file handles as well? Thanks in advance for your help and wisdom, agent_smith
Back to
Seekers of Perl Wisdom
|
|