Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Declaring Subroutinesby Sherlock (Deacon) |
on Apr 24, 2001 at 17:22 UTC ( [id://75039]=note: print w/replies, xml ) | Need Help?? |
Well, according to everything I've read, there are two basic benefits of prototyping your functions: 1. Allows user-defined subfunctions to behave much like the built-in Perl functions, such as time. 2. Allows the programmer to leave out characters, such as parenthesis and back-slashes (for references). Personally, I don't feel that either of these benefits are really worth the trouble of prototyping my subfunctions, but if you'd like some more material to look at that shows a few examples, try this: Prototypes in Perl or a recent post: calling sub routine problem?. - Sherlock
In Section
Meditations
|
|