in reply to Correct code crashes ActivePerl Interpreter
You can also fix the problem by using a lexical file handle.