Just a followup on Emacs in case you haven't used it..
I don't know if XEmacs can do this on NT but
XEmacs on
Linux for example will let you open a shell in a separate
frame of your window (or a separate window if you like)
so that you can edit your program and run it in separate
window panes.
Probably you can do this with emacs in cygwin on windows
if XEmacs for NT can't hack it.
I do have an interactive perl shell (accumulate lines with
readline and eval, I use it to try out Gimp macros) but
you would have to create an editor to do what you want.