Your question is very vague. It's not even clear what domain you're working in. Just for the interest of the other Monks, I'm going to guess that "emi" in your example file stands for electromagnetic interference, and that "ports/pins" are locations where you're applying and/or measuring some kind of test signal in a piece of hardware.

You talk about asterisks in your question, but your example doesn't contain any. Your other post was more understandable in that regard. But what if your waiver file contains these two lines:

c4*_123
c4a_*

If the input is c4a_123, which pattern should match? The first one? In that case, you need to remember the order of the waiver file, so you don't want to use a hash. See choroba's response to your original post.


In reply to Re: Wildcard in a hash by Anonymous Monk
in thread Grep asterisk sign in input file by DespacitoPerl

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.