Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 93731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:23:26+00:00 2026-05-10T23:23:26+00:00

This might be a problem with my understanding with Curses more than with Perl,

  • 0

This might be a problem with my understanding with Curses more than with Perl, but please help me out. I’m using Curses.pm which works quite well except when I try to create a curses ‘window’. Example code:

use Curses; initscr; $w=newwin(1,1,40,40); $w->addstr(20,20,'Hello'); $w->refresh; refresh; endwin; 

outputs nothing. Not using a window works fine:

use Curses; initscr;  $w=newwin(1,1,40,40);  addstr(20,20,'Hello');  refresh;  endwin;  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:23:26+00:00Added an answer on May 10, 2026 at 11:23 pm

    You need to get your arguments in the right place, and it’s not easy to remember what number is what. I always have to look it up after trying all the wrong permutations first. I just look at the man pages for the C interface and then change it to Perl syntax.

    The newwin function, documented in the curs_window man page, takes:

    newwin( height, width, starty, startx ) 

    You set up a window that was one row high and one column wide, starting at row 40 column 40. However, you then tell addstr to put text at row 20 column 20 in that window. That’s outside the 1×1 frame you set up, so you don’t see anything.

    Try this to see if it works for you. If that works, try adjusting the window values to get the frame that you want.

    use Curses; initscr;  $w = newwin(     1,       # height (y)     COLS(),  # width  (x)     0,       # start y     1        # start x     );  $w->addstr(      0,       # relative y to window     0,       # relative x to window     'Hello'      );  $w->refresh();  sleep 10; endwin; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This problem was solved by adding new components by using… May 11, 2026 at 11:11 am
  • added an answer 1/ Extract ALL of the object files from each library… May 11, 2026 at 11:11 am
  • added an answer Rather than removing the first few lines, try editing them… May 11, 2026 at 11:11 am

Related Questions

This might be a problem with my understanding with Curses more than with Perl,
This might be a bit on the silly side of things but I need
This might be a stupid question but if there's a better or proper way
This might be a little hard to explain, but I will try. I want
This might be a old question: Why does IEnumerable<T> inherit from IEnumerable ? This
This might be a silly question: Does HTTP ever use the User Datagram Protocol?
This might be a bit difficult to explain in writing, so please bear with
This might be a stupid question but I just wanted to make sure... If
This might be a bit of a silly question but; If I have two
This might be a stupid question, but I can't for the life of me

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.