in reply to Multiple Prototypes for Object Constructor
However, you are free to inspect the arguments to subroutines, and do different things based on the number of arguments. Arguments are found in @_, using an array in scalar context gives you the number of elements, and Perl has an if-then-elsif-else construct, which gives you all the building blocks to do what you want.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Multiple Prototypes for Object Constructor
by mvc (Scribe) on May 22, 2003 at 16:50 UTC |