iamravikanth has asked for the wisdom of the Perl Monks concerning the following question:
I have to append all files starting with 1 into a single file (1_AppendFile.txt) and starting with 2 into a single file (2_AppendFile.txt) and so on. I could loop through all the files check the starting value of the file and open a filehandle correspondingly and then print the data into the file. But when I consider file numbers close to 10000 it really gets very slow. Is there any other alternative that we can use here. Regards, Ravi.1_ABC.txt 2_ABC.txt 3_ABC.txt 1_XYZ.txt 2.XYZ.txt 5.XYZ.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Appending multiple files into one or more files
by Ratazong (Monsignor) on Jul 19, 2010 at 12:30 UTC | |
|
Re: Appending multiple files into one or more files
by roboticus (Chancellor) on Jul 19, 2010 at 13:41 UTC | |
by roboticus (Chancellor) on Jul 19, 2010 at 13:46 UTC | |
by iamravikanth (Novice) on Jul 20, 2010 at 11:36 UTC | |
|
Re: Appending multiple files into one or more files
by Corion (Patriarch) on Jul 19, 2010 at 12:25 UTC | |
by Anonymous Monk on Jul 19, 2010 at 12:28 UTC | |
|
Re: Appending multiple files into one or more files
by Marshall (Canon) on Jul 19, 2010 at 13:27 UTC | |
|
Re: Appending multiple files into one or more files
by cdarke (Prior) on Jul 19, 2010 at 16:28 UTC | |
|
Re: Appending multiple files into one or more files
by Sinistral (Monsignor) on Jul 19, 2010 at 13:34 UTC |