in reply to $var$cnt problems

It looks like you should read the Why it's stupid to `use a variable as a variable name' article.

Try using arrays instead. That way you will have an array called @fmail, and $fmail[$cnt] will interpolate exactly how you expect.

C.