Click here to get back home

C's gotoxy() equivalent in Perl

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
C's gotoxy() equivalent in Perl Yogi 01-30-2008
Posted by Yogi on January 30, 2008, 5:14 am
Please log in for more thread options
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?

Posted by John W. Krahn on January 30, 2008, 5:24 am
Please log in for more thread options
Yogi wrote:
> 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
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall

Posted by Yogi on January 30, 2008, 5:43 am
Please log in for more thread options
> Yogi wrote:
> > 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
> --
> Perl isn't a toolbox, but a small machine shop where you
> can special-order certain sorts of tools at low cost and
> in short order. -- Larry Wall

Thanks John for providing me link. I believe, I will have to install
Curses as its not available in perl version I am using.
Regards,
-YK

Posted by Gerry Ford on January 30, 2008, 8:42 am
Please log in for more thread options

>> Yogi wrote:
>> > 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
>> --
>> Perl isn't a toolbox, but a small machine shop where you
>> can special-order certain sorts of tools at low cost and
>> in short order. -- Larry Wall
>
> Thanks John for providing me link. I believe, I will have to install
> Curses as its not available in perl version I am using.
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.

PDCurses 2.60-1
--
Gerry Ford



Posted by Ben Morrow on January 30, 2008, 9:12 am
Please log in for more thread options

> >
> > Thanks John for providing me link. I believe, I will have to install
> > Curses as its not available in perl version I am using.
>
> 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


Similar ThreadsPosted
Equivalent in Perl March 12, 2007, 5:42 am
Is there a perl equivalent to the following.... August 23, 2007, 9:06 pm
Perl equivalent for Unix ps. January 30, 2005, 4:45 pm
Perl equivalent of PHP and JSP: Mason? October 23, 2005, 4:36 pm
Is there a perl equivalent of J2EE ? May 8, 2006, 10:46 am
Perl equivalent of this script? July 16, 2006, 10:38 am
PERL 'pwd' equivalent??? September 5, 2006, 12:03 pm
Re: Perl equivalent of htmlspecialchars() May 20, 2008, 7:54 am
Re: Perl equivalent of htmlspecialchars() May 21, 2008, 3:12 pm
Perl/DOS how do i check if directories are equivalent ... August 8, 2005, 11:25 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap