modern_perl_book
modern_perl_book copied to clipboard
Mention how "$" prototype forces scalar context on a parenthesized list
Either in the section that discusses arrays vs lists, or in a section on prototypes, it might be worth pointing out the (possibly) surprising behavior of this:
sub foo($$$) { say "@_" } foo( (1,2,3), 4, 5 ); # prints: 3 4 5