Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: printing in a specific area of the console

by Masem (Monsignor)
on Feb 17, 2002 at 20:07 UTC ( #146035=note: print w/replies, xml ) Need Help??


in reply to printing in a specific area of the console

There's several tricks you can use, either using a module like Curses that takes advantage of positioning on a term, or by using characters like \r or \b which, on most unixen terms, will back up the cursor position. You might want to look at this node that asks a similar question for a full list of ideas.

Note that if you're just putting a line of symbols on the screen, without extra decoration, you can always print those out sequentially when they are needed (eg, one or two characters at a time), without an extra modules.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

  • Comment on Re: printing in a specific area of the console

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146035]
help
Chatterbox?
[1nickt]: tobyink perl -MTypes::Standard= is_Int -Mstrict -wE 'say 1 if is_Int 1.0'
[jdporter]: so that I can use the existing expand unix util. Otherwise, I'll probably use Text::Tabs.
[1nickt]: pryrt I guess I don;t really care if user 42 logs on as 42.0 ... more of an academic question at this point.
[LanX]: jdporter: open PIPE,'-|' ?
[LanX]: oh you want the result line by line?
[jdporter]: ok, LanX, then what?
[jdporter]: It doesn't have to be line by line. Just "my program" "writes" to the external prog and also/then "reads" from it.
LanX open (You are not allowed to open to a command that pipes both in and out, but see IPC::Open2, IPC::Open3, and Bidirectional Communication with Another Process in perlipc for alternatives.)
[jdporter]: IPC::Open2, I guess
[jdporter]: yes, that

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-05-24 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?