I have to agree with
Ovid. As with everything else, why reinvent the wheel? Not only does the build-in debbuger work very well, its already there.
I'm on Win32, so I decided to give ActiveState's debugger a shot, and I have found it not only to be a solid app, but a very very useful tool while trying to figure where things went sour in my apps.
The idea of printing line by line does sound like a cool challenge though, but only as one of those I-wonder-if-this-can-be-done? things...
#!/home/bbq/bin/perl
# Trust no1!