First off, I dont have any code to support this and am asking for an explanation as how to go about this procedure. I have a tab delim file containing the following data:

column relationship value filter_or_append order a <= 0.3 filter 1 b = abc append 3 c <= 0.3 filter 2
Basically, in the beginning of the program, I need to read in this filter file, sort through the order column and order from least to greatest, somehow store each value in a variable (to be later used in the program). Then the program will read in an input file which will be processed based on the criteria defined in the filter file. Ex. the program will first read in the filter file. For column a (order #1) the user wants the program to filter through that specific column for values less than or eq to 0.3. Then the program will move on to order #2. Then the program will move on to order #3 but for this specific column, will search for anything that eq 'abc' and append it to the output file. I have written the code to filter through any specified column but do not know how to store the values of the filter file in such a way that it can be used in the program. Thank you in advance for any help. If I need to clear anything up just let me know.


In reply to Read in a file containing the criteria for a program when it runs by dkhalfe

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.