in reply to sub Prototype Syntax
"@" and "%" mean the same thing: an arbitrary lengthy list of arguments. As such, they gobble the remainder of the arguments, and "$%;$" is therefore the same thing as "$%". That means you have code which never does anything, so Perl warns you.
Secondly, "%" doesn't mean "hash ref". A hash ref is simply a scalar, so that would be "$", for a complete prototype of "$$;$".
You never noticed either error because you explicitly ask Perl to ignore the prototype by using "&" in front of your sub call. Why do you bother creating prototypes if you're just going to ask Perl to ignore them?
None of this is new to 5.12. Apparently, you just weren't warned about your error before then.
|
|---|