Same here, and I didn't think you were being confrontational :) Also not trying to prove you wrong - just trying to understand your views on shift. Your last response helps me better understand your reasoning. Ok. Correct me if I'm wrong - I think your point here is that Less Code vs. More Code when they both _do_ the same thing is that less code is better. On the face of it I agree with you, but I don't agree when more code makes the code more understandable (I'm not saying that more code in this case is better). In this case I think you're right - functionally, shift vs. @_ are the same, but assigning parameter variables from @_ has the advantage of leaving the argument list intact, and it is less code. I'm not sure either one of those reasons or both is enough to sway me to using @_ but I'll certainly think about from now on instead of just using shift :) Agreed. I see your point.

I didn't really mean that I didn't see any merit - it just took a little more explaining for me to understand your position.


In reply to Re^6: How to pass two lists to a sub? by hmerrill
in thread How to pass two lists to a sub? by YAFZ

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.