|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Reorganizing file contentsby tomdbs98 (Beadle) |
| on Jun 08, 2010 at 15:53 UTC ( #843691=perlquestion: print w/ replies, xml ) | Need Help?? |
|
tomdbs98 has asked for the
wisdom of the Perl Monks concerning the following question:
Greetings perl monks, Today my dilemma is reorganizing files. I actually have both a problem and a question. Say I'm starting with 2 files R1 and R2, as follows:and I want to rearrange them so instead I have files I have the files R1, R2 stored in fileArray and I think this should output them the way I would like:
First, my problem is that when I try to print the values after each element, my OUTPUT handle is closed because it is out of scope from where I open it, and I am not sure how to keep it open. My question is: Do you have a more efficient/aesthetic way of doing this? Thanks for your time :)-Thomas P.S. the data sets I will actually be working with are much larger (1000s of lines and a dozen 'R_' files), but they will be generally like this.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||