in reply to Problem with function

This is why, in 99% of cases, you should always pass the variables your function needs TO the function.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart