![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Defining Subroutinesby Zaxo (Archbishop) |
on Oct 24, 2002 at 03:02 UTC ( #207613=note: print w/replies, xml ) | Need Help?? |
You got it backwards. Define a function with sub. You can call it with &max, but it's better to call using parentheses until you're comfortable with what the ampersand does. It causes prototypes to be ignored, and it arranges for the function to be called with the existing @_ as arguments. After Compline,
In Section
Seekers of Perl Wisdom
|
|