in reply to Sub in a Sub & Recursion

Havent read your code in detail, but a cursory look seems to indicate that you are trying something akin to the pascal nested subroutine.

I brought this up (hypothetically) in an earlier thread, and tilly provided a good working translation into real perl using a closure.

Have a look there for some ideas about closures.

Sorry if this is OT, didnt have time to read your post in detail
/me dons flame retardant suit

Yves / DeMerphq
--
When to use Prototypes?