Quote:

b) The SUBROUTINES may alter variables which were declared as globals whilst functions, as explained in the previous posts, have no chance to do so.




This is not correct.

Functions may read and write variables which have been declared (implicitly or explicitly) in the global scope.

Functions cannot access variables which have been declared in the local scope of the script however subroutines can.

You should never use a subroutine if a function will do the job. You should avoid global variables unless you really have to use them.