<?xml version="1.0" encoding="windows-1252"?>
<node id="76037" title="(code) Re: cross-platform timeout on user input (Grrr!! &quot;not supported on this platform&quot;)" created="2001-04-27 11:25:25" updated="2005-07-19 22:12:33">
<type id="11">
note</type>
<author id="14909">
ybiC</author>
<data>
<field name="doctext">
Thanks for the ideas, [THRAK] and [repson]. &amp;nbsp; 8^)
&lt;br&gt;But they don't quite address my quest for knowledge of Win32 perl for timing-out on user input.

&lt;p&gt;
Anyone? &amp;nbsp; Bueller? &amp;nbsp; &lt;i&gt;{grin}&lt;/i&gt;

&lt;p&gt;
&lt;b&gt;Update: &lt;/b&gt;
&lt;br&gt;Thanks to good monk [tye] for a polite RTFM &amp;nbsp; 8^) &amp;nbsp; &lt;tt&gt;perldoc Term::ReadKey&lt;/tt&gt; indicates that it just *might* support timeout internally. &amp;nbsp; I'm still experimenting with the syntax - will post results.

&lt;p&gt;
&lt;b&gt;Update: &lt;/b&gt;
&lt;br&gt;No go. &amp;nbsp; "&lt;i&gt;Non-blocking ReadLine is not supported on this architecture&lt;/i&gt;" with ActivePerl 5.6 on Win2k, but runs fine on Debian 2.2r3
&lt;code&gt;$!/usr/bin/perl -w

use strict;
use Term::ReadKey;
use Term::ReadLine;

ReadMode('noecho');
print 'enter password:';
my $pass = ReadLine(5);
ReadMode('restore');
unless (defined($pass)) {
    print "\n\nSorry, you waited too long.\n\n";
    exit;
    }&lt;/code&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;muttering to himself...&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Don
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;striving toward &lt;a href="http://prometheus.frii.com/~gnat/yapc/2000-stages/"&gt;Perl Adept&lt;/a&gt;&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font size="-2"&gt;(it's pronounced &amp;quot;why-bick&amp;quot;)&lt;/font&gt;</field>
<field name="root_node">
75871</field>
<field name="parent_node">
75871</field>
</data>
</node>
