in reply to File closing on its own?

&& has a higher priority than a comma in list context. You need to put parens around the arguments of open, or replace && with and.

Abigail