in reply to arrays passed into subroutines

Also if you use prototypes, you can make your sub to be like
sub team_update (\@\@) { my ($values_ref,$teams_ref)=@_; }
This would allow chaging the values within subroutine and also check that you call the subroutine properly (with strict).