in reply to comparing multiple arg values against multiple files

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.