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

Hi,

Shell programming, like in dos or unix/linux perl. Some programs write to the same line over and over, or something like PICO will allways have a menu on the bottom and will let you scroll your text. Or you'll have a little text animation, where one character on the screen constantly changes.

How can I do this, or under what programming topic do i research this? Cursors?

Replies are listed 'Best First'.
RE: Cursors or something
by neshura (Chaplain) on May 24, 2000 at 03:12 UTC
    \r can be used for some things like this. Check out this whirlygig

    e-mail neshura

      I'm glad you understood that question... because I certainly didn't.

      Can anyone explain what we are talking about here? Thanks.

Re: Cursors or something
by takshaka (Friar) on May 24, 2000 at 04:09 UTC
    You probably want the Curses module or one of the Term::* modules, but it's hard to tell.
RE: Cursors or something
by dempa (Friar) on May 24, 2000 at 14:51 UTC
    It has been said already, but curses is probably the thing you want here. If curses programming scares you, you could always have a look at CDK (Curses Development Kit). I've used it a few times, and it's quite good when you want results fast. It can be a bit hairy sometimes, but with practice...

    HTH! /dempa

(crazyinsomniac) Re: Cursors or something
by crazyinsomniac (Prior) on May 26, 2000 at 01:28 UTC
    Hi Monks,

    Thanks for your replies.

    The \r escape worked fine?

Re: Cursors or something
by btrott (Parson) on May 24, 2000 at 03:16 UTC
    I'm not sure if this is what you want, but couldn't you just use a linefeed? Try this:
    perl -e 'sleep 1, print STDERR ++$i, "\r" while $i < 9'