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.
shiny regexes and rules offered by Perl 6
other CPAN module
by looking at it on my monitor
I print it and I read it in spare time
first I convert it into $FORMAT, then I parse it
I hire someone to do it
using my custom module
I write a brand new language to do the task
on the server where I play as human, XML is forbidden
what is XML?
I speak XML natively
I write a new grammar for Perl 6
some other way
Results (162 votes),