Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print issue

Status
Not open for further replies.

adimstec

IS-IT--Management
Nov 27, 2002
52
FR
Hello,

I would like to display an outpout on the sceen by using the perl command perl.
What is the option to print at the line 11 and column 14 for example ?

Thanx

 
Thank you Xaqte.

I was just expecting a simple manner to use option on the command print , just to display on the screen ( like \n or \t or something else)
 
Hi,

Can you explain a bit more what you want? You're being a bit vague ;)

Cheers

Andy
 
Hello Andy,

I just want to display on a scrren a message.
I want to choose the place exactly.

Example :


print "Hello \n"; I know \n means rc.

My question is : What is the options I can use to display this message at the column and line I choose on the screen.

I hope I've been clear.

Thank you anyway :)

 
Hi,

Still not sure I 100% understand you. You tried \t (tab)

This lets you format things a lot easier.

Cheers

Andy
 
I think he's wondering about character positioning in a terminal window. i.e. you have a standard terminal size of 80x24 characters and he wants text to appear at say column 10 row 12. Is that right?

Another way to think of it is like, if you've already printed stuff to the terminal and you want to reposition the cursor and print over something already there (i.e. to adjust an ASCII status bar, like...)

Code:
(before)
+----------------------------+
|####                        | 15%
+----------------------------+_

(after)
+----------------------------+
|#########                   | 30%
+----------------------------+_

where _ is where the insertion cursor is currently at. so you'd wanna reposition the insertion cursor so it can retype the progress bar and rewrite what the current % is at, instead of print() just continuing from the end...

There are ANSI escape codes that can reposition the insertion cursor, but not all terminals support them. You might want to look at the Curses modules too.

-------------
Cuvou.com | My personal homepage
Code:
perl -e '$|=$i=1;print" oo\n<|>\n_|_";x:sleep$|;print"\b",$i++%2?"/":"_";goto x;'
 
I would like to display an outpout on the sceen by using the perl command perl

There is no perl command.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top