I need some clarification:
  • What do you mean by "arg value"... do you mean the arguments at a subroutine like so:
    sub y { my @arg = @_; print join ':', (@arg[0..2]); }
  • What do you mean "compare against respective files"? How do you want to compare them and what is in each "arg value"?
  • You never mention the purpose or contents of the 3rd "arg value"

    In the large, it sounds like you are doing this: <code> sub y { my @arg = @_; if (compare($arg[0],$file[0]) { if (compare($arg1,$file1) { print '...'; } } else { print 'dont care about the second'; } } <code>

    The compare() pseudo-function above could be a short as Perl function/operator or as long as subroutine or method call depending on how you clarify the definition of your problem.


    In reply to Re: comparing multiple arg values against multiple files by metaperl
    in thread comparing multiple arg values against multiple files by dallok

    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.