Why this been built like this? Scope of the $1 ... $10 .... variable in the sub functions or next reguler exprsn results checking level is being getting effected and it's strange and dangers check points, if the user dependent on these variables.