in reply to Re^8: getting a while loop to terminate
in thread getting a while loop to terminate

I prefer to use  die sprintf "(%d) %s", $!, $!; because the frequent Unknown Error isn't very useful :)