Question : How to put background and foreground color also put those text in middle of the screen.

HI
Here i am not asking about Cgi or web programming or Gui(tk, its about console programming

example @code section

so it will will show , whats your name  and will wait for name in the following line,

Now i want to put a white background under "whats is your name" and green background with cursor showing where i will type my name
HOw to do that ??

Or may be put those entry in middle of the screen .

any good references for this ?? web tutorial for starter or article ??

please have a look at pic if i am not clear
thanks
1:
2:
3:
4:
5:
print " What is your name?\n";
$name = <STDIN>;
print "What is father's name\n";
$pname=<>;
print"Hellow $pname\n";
Attachments:
 
 

Answer : How to put background and foreground color also put those text in middle of the screen.

Have a look at some of the Curses libraries.

There are others available but start with:

Curses - terminal screen handling and optimization
http://search.cpan.org/~giraffed/Curses-1.28/Curses.pm

Curses::UI::Color - Color support module
http://search.cpan.org/~mdxi/Curses-UI-0.9607/lib/Curses/UI/Color.pm

and scroll through these:
http://search.cpan.org/search?query=Curses&mode=all
Random Solutions  
 
programming4us programming4us