C's gotoxy() equivalent in Perl

Y

Yogi

Hi,
I am trying to print something on my screen at specific location. Do
we have anything equivalent to gotoxy() , as we have in C language, in
Perl? I tried using Term::Cap but not getting any success.
Getting an error message : "TERM not set at...".

I am trying to run my perl script on Windows envt.
Perl version = v5.8.8 built for MSWin32-x86-multi-thread

Any pointers/help?
 
J

John W. Krahn

Yogi said:
Hi,
I am trying to print something on my screen at specific location. Do
we have anything equivalent to gotoxy() , as we have in C language, in
Perl? I tried using Term::Cap but not getting any success.
Getting an error message : "TERM not set at...".

I am trying to run my perl script on Windows envt.
Perl version = v5.8.8 built for MSWin32-x86-multi-thread

gotoxy() is not a C language function, it is a Curses function:

http://search.cpan.org/~giraffed/Curses-1.20/gen/make.Curses.pm


John
 
B

Ben Morrow

Quoth Yogi said:
Hi,
I am trying to print something on my screen at specific location. Do
we have anything equivalent to gotoxy() , as we have in C language, in
Perl? I tried using Term::Cap but not getting any success.
Getting an error message : "TERM not set at...".

I am trying to run my perl script on Windows envt.
Perl version = v5.8.8 built for MSWin32-x86-multi-thread

Term::Cap won't work under Windows. I would recommend Term::ANSIScreen
for what you're trying to do; you could also look at Win32::Console.

Ben
 
B

Ben Morrow

Quoth "Gerry Ford said:
Maybe one way to get what you want is to install Ruby and borrow the curses.
I frankly don't know a curse from a gem or a rake, but since Ruby was
created using MVC++6, it might be better for windows stuff than the
equivalent from perl.

ActivePerl is build using MSVC6, and if the OP has MSVC (and Curses will
build under Windows at all) it will build perfectly well. Also, recent
versions of ActivePerl have some provision for using MinGW to build
modules that are compatible with perl.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top