Can anyone tell me what is the matter with the following code? Is it a problem with the code or with Windows Vista?
use strict; use warnings; use 5.010; print 'Enter your password: '; my $password = eval { local $SIG{ALRM} = sub {die "timeout\n"}; alarm 5; return <STDIN>; }; alarm 0; if ($@ =~ /timeout/) { say "You timed out."; }
In reply to $SIG{ALRM} and windows vista? by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |