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

jmClifford has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I would like to control the position of the cursor on the console display of my Perl_Eclipse_IDE. When I, print "Input command: "; then the cursor needs to be at the end of this outputted string, and not where I stopped typing on a previous input.

Regards JC.....

Replies are listed 'Best First'.
Re: Console cursor position control (Eclipse IDE, terminal emulation)
by LanX (Saint) on Jul 08, 2024 at 14:56 UTC
    Your IDE needs to run your program in a terminal emulation for that.

    If that's not possible you may consider hacking a special test mode.

    Redirecting STDIN/STDOUT to a console/terminal subprocess, while keeping STDERR and process control inside your IDE's mainprocess.

    I think (?) I did this in the past from within Emacs, but I can't find it anymore.

    Hope I gave you enough feedback for further research on the matter.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

Re: Console cursor position control
by The_Dj (Scribe) on Jul 09, 2024 at 02:36 UTC
    I've not used EPIC for a long, long time... some 3 countries ago, but

    Something to consider is whether your terminal is raw or cooked.
    Have a google around and be sure you aren't getting some magic from your 'terminal'.
    Think of things like Terminal::Control

    Luck