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 { ... }
In reply to Re: Perl subroutine update
by cdarke
in thread Perl subroutine update
by craziestfire73
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |