perl 5.6 syntax is used
will not hang on Windows