in reply to my variables in a subroutine

Refer How to post a question

I think you need closures. If not, please explain your question?

Read closures in Advanced Programming in perl by Sriram srinivasan

--Lakshmanan G.

Your Attempt May Fail, But Never Fail To Make An Attempt