in reply to Scalars within Subroutines (scope)

Thanks for the information. The $a $b was my mistake, I guess I should pay more attention to what I am doing :). Does anyone have a preferred way of doing things in this example?

Thanks