JohnQ,

The "$richard" in the function is completely different from the one in your main script. It is a new variable which contains a copy of the data passed to it, and is only visible to the function.

The visibility of the variable is what is known as its "scope".

Variables which are declared in the function definition have a scope local to the function, the same as if you had DIMmed them within the body of the function.

The fact that they have the same name is not relevant.

If your variable "$richard" in the main script is a global variable it will be obscured by the local "$richard" variable in the function - there is no way to reference it.