I'm trying to think of a way of solving what seems to be a relatively simple problem but is turning out to be a bit more tricky than I thought.
I have in a directory 73 text files. Each text file looks something like this.
3.544
3.765
6.2341
8.9756
I want to create another file with all but one of these text files included ... but printed like this
file1datapt1 file2datapt1 file3datapt1
file1datapt2 file2datapt2 file3datapt2
etc ...
My task is to create 73 text files with all the datapoints of the files in the directory printed bar one ... the file to be excluded perhaps parsed to the program via the command line.
Right now ... because each small file has to be printed in the larger file with the datapoints going down the page as it where, the only method my pea brain comes up with is a horrible bested loop idea that will probably grind my wee computer to a halt.
I'm not looking for code necessarily (although all donations gratefully recieved) just suggestions of how to tackle this would be appreciated. Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.