Move the subroutine definition to somewhere else, for example to the top of your code, before the main part of the code starts. Then call the subroutine at the point in the code where you have now defined it.
Also note that when you split a line:
In reply to Re: redrafted code
by lyklev
in thread redrafted code
by velocitymodel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |