http://www.perlmonks.org?node_id=1041307


in reply to "Deep recursion" error

Try single stepping through your program with the perl debugger perldebug / debugging tutorial and maybe you'll see why it's not working.