in reply to Perl subroutine update
defines a prototype (that empty set of parentheses) which means "don't accept any arguments". You are then overriding the prototype by calling the subroutine with the '&' prefix. The prototype would still not work anyway because you have defined it after you call it, but you don't want a prototype anyway, just:sub deck(){
sub deck { ... }
|
|---|