in reply to Re^3: using reference to subroutine
in thread using reference to subroutine

The syntax for calling the ref should be &$iter($index)

Well, also $iter->($index).