Hi again all. Thank to your awesome help, I am rolling right along. I have one more part (I think) to accomplish. I've gotten my parsed log into this kind of format:
label1=value1 label2=value2 ... labeln=valuen
I have an array that represents the CSV layout from another program that my output has to match. There are 900+ elements in the array, but I will never see 900+ lines of parsed output. So I need to loop through the array and look in all my parsed output lines to see if array element = "labeln" in any of the output lines. If it does, I need to print "valuen;" to my CSV output file. If not,, I need to print ";" to my CSV output file, so there would either be a value or a semicolon for each item in the format array. I have tried map, grep, regex, smartmatch, putting all the labeln into an array... I am out of ideas. Anyone know how I can successfully accomplish this task? Thanks!!

In reply to Determine if array value in string results by ImJustAFriend

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.