Sep 10, 2015, 7:53 AM
Post #2 of 3
That assignment is in scalar context. When an array is used in scalar context like that, it returns the number of elements. You need to change that assignment to list context.
Re: [kvok] how to pass value to subroutine
[In reply to]
BTW, you're not passing anything to the sub. I assume you meant to call the sub like this:
(This post was edited by FishMonger on Sep 10, 2015, 7:56 AM)