* Tom Christiansen <tchrist@perl.com> [2011-07-20 08:55]: > >* David Golden <xdaveg@gmail.com> [2011-07-18 22:40]: > >> As Tom points out, there is no problem with 2-arg open if > >> *you* control all the arguments and know what you're doing. > >> The rationale for 3-arg open is (IMO) that it's less > >> error-prone. > > >2-arg open is also useful when you don’t *want* to control all > >inputs, such as giving a caller the option to ask for > >transparent decompression by piping from zcat instead of > >reading from a file. > > No, two-arg open is perfectly fine here: > > open(STDOUT, "> /dev/null") Where did you get the idea I said anything to the contrary? The conversation focussed entirely on how 2-arg open is fine provided care is taken. I was missing any mention of how the magic is not merely a potential pitfall, is in fact sometimes desirable, a feature. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous | Thread Next