When you said "... there was a tracing program where I can actually step through the program and I personally think perl's debugging mechanism is little bit behind. ...."
I wondered if you were aware that Perl has a trace command that you can turn on the trace flag, and then just continue the code and watch it work --- that might be easier to follow than "stepping" through the program.
DB<1> t
Trace = on
DB<1> c