perl 5.6 syntax is used
will not hang on Windows
Merge pull request #1 from chorny/master

will not hang on Windows