in reply to The purpose of prototypes in perl subroutines
Prototyping has a use when running with the strict 'subs' pragma. While it is in effect, you will have to prototype your subs to use the bareword style when calling:
or, use the ampersand or parens:sub mysub; print mysub;
*** Special thanks to Nat Torkington. I've been reading Jon Orwant's Computer Science and Perl Programming book lately. Good information, and a good review of perl topics you may have forgotten. Pick it up if you don't have it.print mysub();
J. J. Horner CISSP,CCNA,CHSS,CHP,blah,blah,blah
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: The purpose of prototypes in perl subroutines
by Joost (Canon) on Apr 13, 2005 at 15:31 UTC | |
by jjhorner (Hermit) on Apr 13, 2005 at 15:32 UTC | |
by Joost (Canon) on Apr 13, 2005 at 15:45 UTC | |
by brian_d_foy (Abbot) on Apr 13, 2005 at 17:36 UTC | |
by jjhorner (Hermit) on Apr 13, 2005 at 17:41 UTC | |
by brian_d_foy (Abbot) on Apr 13, 2005 at 18:12 UTC |
In Section
Seekers of Perl Wisdom