Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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

In reply to printing contents of small files into one larger one by Angharad

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2024-04-23 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found