Hello Friends,
Does anyone know how to open a folder rather than a simple file (text file or otherwise)? I'm not sure about the basic syntax of such a thing. What I am trying to accomplish is to parse out data within a series of text files found in a folder. However I'm not sure of how to perform a task on a number of files that will vary. Normally I have the user type in the file to parse on the command prompt. This program needs to be automated to the point of taking a given folder (stated by user), and assigning a filehandle to each text file. Once this is done, I need to be able to reference each so my basic parsing element can act on each file and converge the data into one output file. The actual parsing element is only a few lines long; getting all the data in and referencing the filehandles is the issue. Thanks so much for your help!!!

Bioinformatics

In reply to Variable numbers of folders... by bioinformatics

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.