in reply to
Re^3: appending to a file
in thread appending to a file
I want to append the three files to my $out file. I only need each file appended once. The loop is appending each filefour times. Any ideas?
Without a fair bit of rewriting your original code, you can add a last; after the final call to close() -- this will exit the for my $f(@files) loop.
This isn't the way I'd write the script, personally, but I don't know enough about your file structure to revise it accurately. I'd probably use File::Find to make this a bit simpler.
By rote learning.
Via Genetic memory.
It's provided by my firmware.
I just remember them.
Thirty days hath September
My computer gets it right, usually.
I just ask someone else.
Someone punches me on the first of the month.
Results (208 votes),