Actually I know that vim can embed perl. More to that, I, personally, write a number of vim scripts with perl, and found this technology extremely powerfull.

To say, I saw how someone implements in VIM script a bubble-sort, to save people from feeding lines to 'sort' external program (it is not always available).
Needless to say, this is just one line in Perl.
I do SGML stuff using Perl from inside VIM scripts, among other things.

But VIM probably do not allow step-by-step debugging like Emacs, due to its intention to be compact and not part of OS.

I saw somewhere that "emacs is a good OS but lacks editing capabilities"

But VIM probably do not allow step-by-step debugging like Emacs, due to its intention to be compact and not part of OS.

Why do you keep saying that? What makes you think you can't control external processes such as a debugger with Perl? Is it a problem sending the process commands? Maybe you don't think its output can be parsed? Or is it something else?

You are behind the times. Vim has been able to embed Perl, Python and Ruby for a while. There's a Vim plugin using the Perl interpreter to turn Vim into an IRC client, f.ex. One of my pet projects uses the Perl interpreter and Gtk2 to add some minor IDE-ish features to gvim/gtk+.