Hello Anonymous Monk,
Thanks for the time and effort, reviewing my script. You are absolutely right. I checked the source of the script and it is actually that simple.
Well it is easier for me to use the lexical methods instead of creating my own subroutines and call them inside the script. But you gave me a nice idea on how to proceed.
Thanks again for your time and effort, BR.