Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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.

stephen


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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-31 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls