I have a function that got a reference to an array passed. I wanted to get the array using
The interpreter tells me this is ambiguous. Replacing @{ shift } with @{ shift() } works fine. Yet I cannot see the ambiguity of the first statement. Can anyone explain the other meaning to me?sub my_func{ @vals = @{ shift }; ... }
In reply to Ambiguity of @{ shift } by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |