G'day Speed_Freak,

"Sorry for the crap post, I'm on a time crunch ..."

Well, I expect you are. You wasted (your limited) time writing this (in your own words) "crap post" and are no closer to a solution. The aphorism, "more haste, less speed", would seem appropriate here.

What you've posted, seems to be asking how to do something like these:

$ perl -E 'my @x = (0..4); my @y = (0,1); my @z; @z = @x if $x[1] == $ +y[1] || $x[3] == $y[1]; say "|@z|"' |0 1 2 3 4| $ perl -E 'my @x = (10..14); my @y = (0,1); my @z; @z = @x if $x[1] == + $y[1] || $x[3] == $y[1]; say "|@z|"' ||

Or perhaps these:

$ perl -E 'my @x = (0..4); my @y = (0,1); my @z; @z = @x if $x[1] =~ / +$y[1]/ || $x[3] =~ /$y[1]/; say "|@z|"' |0 1 2 3 4| $ perl -E 'my @x = (10..14); my @y = (0,1); my @z; @z = @x if $x[1] =~ + /$y[1]/ || $x[3] =~ /$y[1]/; say "|@z|"' |10 11 12 13 14|

Although, I rather suspect that what you really want help with is quite different.

"... it has a ton of extraneous data that I don't want, and has proven incredibly hard to prevent from being entered into the array."

It sounds like that is probably what you should be asking about. Fix the source of the problem instead of patching whatever mess comes out the other end.

"OOOOH, and while we're at it, lets ..."

Let's not! If it's at all possible, that makes even less sense that what went before it. I read it a few times ... I gave up.

— Ken


In reply to Re: Filtering array based off of two values against second array by kcott
in thread Filtering array based off of two values against second array by Speed_Freak

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.