Does anybody know, how to write the kbhit() function of C/C++ in Perl?
The function has to be usable for Unix/Linux...(so, it's not the same like
in conio.h of C/C++)
Functionality:
Return value is 0 when no key was pushed.
If a key was pushed, return value is != 0.
I hope someone has an answer for me.
Roman
On Thu, 1 Nov 2001 22:16:25 +0100, "Ernst Studer"
<studer...@zik5722.ch> wrote:
> Does anybody know, how to write the kbhit() function of C/C++ in Perl?
Have a look in the Perl FAQ. `perldoc -q key` yields several bits of
useful code; one of them is `perldoc -q "input is ready"`.
Cheers,
Philip
--
Philip Newton <nospam...@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
The module Term::Screen has a method key_pressed() that does exactly this.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|