On Mon, Jul 18, 2011 at 4:16 PM, Mike Doherty <doherty@cs.dal.ca> wrote: > So, is there a reason to expend brainpower on knowing and assessing whether > to use 2- or 3-arg open, or is 3-arg always suitable? If 3-arg is always > suitable, then I'd like to hear the case for including 2-arg (and 1-arg!) in > the tutorial. perlfunc should of course describe things as they really are, > since it is a reference and not a tutorial. People will encounter 2-arg open in the wild in other people's code. For a tutorial, it's important to teach what else people might see (and why not to blindly start using that same style). 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. So I think using 3-arg primarily in at tutorial makes sense, as well as including a section on 2-arg explaining under what circumstances it's "safe" for use. -- DavidThread Previous | Thread Next