The problem is that variables defined in subroutines have a private scope, meaning that they can't be accessed outside of that subroutine. Inside...
Separate names with a comma.