Yah, in general, I would avoid prototypes. Per Damian Conway's Perl Best Practices, they're a bit difficult in that they will turn arrays that you think will be treated like individual list items into being evaluated in scalar context, thus only passing the number of elements in the array. They're a bit too magical.
Thanks for the tip about syntax highlighting! I'm new to publishing here, so everything helps!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yah, in general, I would avoid prototypes. Per Damian Conway's Perl Best Practices, they're a bit difficult in that they will turn arrays that you think will be treated like individual list items into being evaluated in scalar context, thus only passing the number of elements in the array. They're a bit too magical.
Thanks for the tip about syntax highlighting! I'm new to publishing here, so everything helps!