473,378 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to determine if a key is pressed when tell user to hit any key to continue?

I'm trying to figure out how to read if a key was pressed by the user. For example, a line from a file is displayed and the user is prompted to hit any key to see the next line in the file. I've tried getc(STDIN) with no luck. Maybe I didn't do it right; I don't know. Any suggestions on how I can do this?
Jul 29 '09 #1
6 2855
RonB
589 Expert Mod 512MB
Term::ReadKey
http://search.cpan.org/~jstowe/TermR....30/ReadKey.pm
Jul 29 '09 #2
@RonB
I tried using that, too, but now I realize you probably have to insert use CGI qw/:standard/; to make it work, correct?
Jul 29 '09 #3
@JWest46088
I'm still getting an internal server error from ReadKey, and I did give the program permissions. Any idea why?
Jul 29 '09 #4
KevinADC
4,059 Expert 2GB
Maybe you missed this or did not understand:

Term::ReadKey - A perl module for simple terminal control


Term::ReadKey is not for CGI scripts. CGI script don't operate like local programs, you can't use the "hit any key to continue" philosophy. You have to use the "click this button to continue" where when the button is clicked on it sends data back to the CGI script and does whatever it needs to do.
Jul 29 '09 #5
Oh okay. That's probably why getc didn't work either, huh?
Jul 29 '09 #6
KevinADC
4,059 Expert 2GB
@JWest46088
Thats right
Jul 29 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Rune | last post by:
Hey I'm trying to build a gui application and need to know if the user is actually holding down the shift or ctrl key. That is, if the user currently is holding down the shift key. In pseudo...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
1
by: efiryago | last post by:
I have about 200 tables in a DB2 V8.1.4 LUW application schema. There is a third party java appllication that accesses this schema. It started failing and relevant entries in db2diag.log have this:...
7
by: semedao | last post by:
Hi all, I view many posts about this issue , the connected property does not tell us the current status of the socket. based on couple of suggestions of msdn , and some article here , I try to...
8
by: rdemyan via AccessMonster.com | last post by:
Anyone have any ideas on how to determine when the back-end file (containing only tables) has been updated with new data. The date/time of the file won't work because it gets updated to the...
28
by: Tim Daneliuk | last post by:
I have a program wherein I want one behavior when a file is set as executable and a different behavior if it is not. Is there a simple way to determine whether a given named file is executable...
8
by: Johannes Meng | last post by:
Good day, I'm experimenting with unbuffered input at the moment. To get input I basically use cin.get(). My problem are control sequences preceeded by an ESC character (i.e. up, down, f-keys et...
3
by: mmckinnon | last post by:
Hi All, This is really basic but I'm having trouble finding a straight forward way to do this. I have an Access application where the for is in spreadsheet mode. When a user leaves a control...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.