Hazael Maldonado Torres wrote:

> --
> Hi there.
>
> I am trying to use prototype functions with object but this seems not
> to work, I mean perl does not check for the type of arguments.
>
> I usually do this.
>
> sub array_print(\@);
> ...sub array_print(\@)
>   ...

Your immediate problem here is that you are trying to use an expression as a
formal argument.  Formal arguments in Perl can only take storage types.  Really,
the only meaningful ones are scalar and list.  The list, if it is present, must
be the last parameter, and there can only be one, since any list will consume
all arguments offered from there on.

The formal parmeter expressions you show are both array references.  These are
scalars.  They should be prtotyped as $.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to