The call works because the prototype forces the arguments to be references. From the Prototypes section in perlsub:
Any backslashed prototype character represents an actual argument that absolutely must start with that character. The value passed as part of @_ will be a reference to the actual argument given in the subroutine call, obtained by applying \ to that argument.
However, in general it is best to avoid prototypes exactly because they cause this sort of confusion.
In reply to Re^2: Subroutine Parameters
by GrandFather
in thread Subroutine Parameters
by radicalfix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |