Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: full screen UI in perl

by stephen (Priest)
on Jun 12, 2001 at 04:19 UTC ( #87688=note: print w/ replies, xml ) Need Help??

in reply to full screen UI in perl

If you're displaying on an ANSI terminal, you can also use Term::ANSIScreen to move the cursor around. Here's a sample that clears the screen, prints "Hello" at column 10, row 10, pauses, then prints "Bye" on the same line.
use strict; use Term::ANSIScreen qw(:cursor :screen); $| = 1; cls; locate(10, 10); print "Hello"; sleep(1); locate(10,10); clline(); print "Bye"; sleep(1);

Update: Turned off buffering (which was causing some problems) and added example for clline.


Comment on Re: full screen UI in perl
Select or Download Code
Replies are listed 'Best First'.
Re: Re: full screen UI in perl
by chip (Curate) on Jun 12, 2001 at 04:43 UTC
    Wouldn't you be better off setting $| = 1 then printing without the newlines?

        -- Chip Salzenberg, Free-Floating Agent of Chaos

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://87688]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2016-05-29 23:24 GMT
Find Nodes?
    Voting Booth?