Windows doesn't have signals
No, but it simulates some of them:
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>; sleep 10; }; alarm 0; if ($@ =~ /timeout/) { print "You timed out.\n"; } __END__ [ 7:18:01.22] C:\test>alarmit.pl Enter your password: You timed out.
In reply to Re^5: $SIG{ALRM} and windows vista?
by BrowserUk
in thread $SIG{ALRM} and windows vista?
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |