It doesn't do what you think it does (Perl doesn't have named formal parameters, and yes I read your mind). Prototypes cause trouble and are best avoided. But to answer your question, prototypes allow you to change Perls usual argument-passing mechanism. It is an understatement to say this is tricky. If you want to validate arguments passed in you might want to take a look at Params::Validate. Also the PBP has a few good tips on how to use subs.
HTH
Harry
In reply to Re: USAGE OF Prototype
by dHarry
in thread USAGE OF Prototype
by abubacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |