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 287k
  • Answers 287k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You would normally handle the MouseClick event to detect the… May 13, 2026 at 5:11 pm
  • Editorial Team
    Editorial Team added an answer Well i would encapsulate the checks in a protected method… May 13, 2026 at 5:11 pm
  • Editorial Team
    Editorial Team added an answer In addition to Martin Beckett's answer. Be careful with licenses!… May 13, 2026 at 5:11 pm

Related Questions

Let me preface this by saying I'm a complete amateur when it comes to
I have a controller in MVC serving up images from a database. EDIT: This
We are in evaluating technologies that we'll use to store data that we gather
I have been building a new application using my current understanding of domain driven

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.