in reply to subroutine reference parameters
Also you are declaring your function with a prototype, but when you call it you use an &. The & disables the prototype check.