You called your subroutine, and then tried to call its result again, as a subroutine:
&$subref; # this calls the subroutine &$subref->(); # this calls the subroutine and tries to call the result + again, as a subroutine
Using & is a bad idea in most cases.
In reply to Re^3: I'm getting some weird error
by Corion
in thread I'm getting some weird error
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |