From perlsub. To call subroutines:
1. NAME(LIST); # & is optional with parentheses. 2. NAME LIST; # Parentheses optional if predeclared/imported. 3. &NAME(LIST); # Circumvent prototypes. 4. &NAME; # Makes current @_ visible to called subroutine.
Personaly I prefer to use NAME(LIST); and prefix & only in special cases like &$code.
In reply to Re: Perl Subroutines Call
by ph0enix
in thread Perl Subroutines Call
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |