Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: File APPEND/OVERWRITE

by kielstirling (Scribe)
on Feb 09, 2012 at 07:00 UTC ( #952667=note: print w/ replies, xml ) Need Help??


in reply to File APPEND/OVERWRITE

You may want to look at opening the output files outside the main foreach loop. I suspect this is your problem. You are opening the same file each time you loop over @files. So the amount of entrees in the list will determine the amount of open file handles. If you must do it that way at least call close within the @files loop Also you should always check for any errors when opening a file.

i.e
open FH, "<file>" or die $!;

This simple check can give you back hours of your life ;)


Comment on Re: File APPEND/OVERWRITE
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2014-07-31 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls