We don't bite newbies here... much | |
PerlMonks |
Re: Length of Array Passed as Referenceby GrandFather (Saint) |
on Dec 10, 2020 at 02:01 UTC ( [id://11124921]=note: print w/replies, xml ) | Need Help?? |
The key issue is your parameter assignment in test_function. @_ is an array
Prints:
Note too that in Perl since last century you don't need to call subs using &. In fact doing so can cause some very nasty to find bugs. Dumping $ref_array instead of @_ may have helped you pick up the error. Update: corrected brain fart - thanks haukex
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
In Section
Seekers of Perl Wisdom
|
|