Have you tried the alarm SECONDS
function (In an eval block) - it's usage as a timeout timer is described in perlfunc.
"We are enthusiastically pro-laugh, we are pro-choice as well. We respect each and every individualÃÂs right not to laugh. If you want to be miserable, go right ahead. Whatever makes you happy."
E:\>perldoc perlport|grep alarm
alarm SECONDS
alarm Not implemented. (Win32)
E:\>perl -le"alarm 0"
The Unsupported function alarm function is unimplemented at -e line 1.