Thank you so much guys.. so the primary function of the code is to search through the text files in the folder and print every line that includes a the exact match to the number (contained within the line). the secondary requirement is that IF after searching through all the files no single match is found of the number then print at the bottom that it was not matched

this is a sample of the data:

Port Name Status Vlan Duplex Speed Fa0/1 Sohnsons connected 1404 full 100 Fa0/2 Sohnsons connected 1404 full 100 Fa0/3 XYZ connected 1221 full 100 Fa0/4 Sohnsons notconnect 1404 full 100

If you searched the files for 3 number (1404,1221,1234) 1234 would not be matched and printed, thus we would want "1234 not matched" printed. The code you presented worked really well for a single search, but we need to search multiple values


In reply to Re^4: Bolt on where a match is not found to a print script by Anonymous Monk
in thread Bolt on where a match is not found to a print script by Anonymous Monk

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.