in reply to Re: Re: What is inside of () on a sub call?
in thread What is inside of () on a sub call?
It will only accept a single scalar. That scalar might be a constant string, a scalar variable, or a reference to anything. Perl prototypes are not for enforcing types or informing anybody of expected content. That is a major difference with C/C++ or Java.
Characterization only happens if your type is listed in the prototype as \$. In that case a reference to an lvalue scalar is admitted. References to hashes, arrays, code etc. are all possible.
Update: duff++, good catch.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: What is inside of () on a sub call?
by duff (Parson) on May 22, 2004 at 15:31 UTC |