You should better have said open FH, "<user1.cfg" or, really, open FH, "<", "user1.cfg". Make it a habit of using the three-argument form of open - esp since I suspect that in this case, your filename will not be hardwired but dynamic and maybe even derived from user input. In that case, the two-argument form may leave you open to a range of problems from "simple" bugs to outright security holes.