If you pass in more than two args or change the assignment from being what is essentially a no-op (such as passing in a tied value) youll see the two are quite different. One returns an array and the other a list. A list in scalar context is its rightmost element, an array in scalar context is its size. Additionally @_ is special, assigning to it alters the original variables passed in. Im actualy surprised you dont get an attempt to modify a read only value error from two_hard().
In reply to Re: Why does assignment change the result?
by demerphq
in thread Why does assignment change the result?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |