/ Published in: Perl

Author: jsinix([email protected])
This is a script that demonstrates how to get input from keyboard with a timeout. This can be useful in many places.
This is a script that demonstrates how to get input from keyboard with a timeout. This can be useful in many places.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl # This is a script that demonstrates # how to get input from keyboard # with a timeout. This can be useful # in many places. use strict; use warnings; sub ask_data { my ($tout) = @_; my $answer; eval { $answer = <STDIN>; }; if ($@) { $answer = 'No answer given'; } } my $data = ask_data('10');
URL: www.jsinix.com
Comments
