Chris Mortimore wrote: > > Rob Dixon wrote: > > > > <snip> > > > > You need to think about what happens when the two files are > > different lengths. You may not expect that to happen but > > your code should still handle that case. Some symmetry > > between the handling of the two files would also be nice. > > Finally you should really use 'print' here instead of > > 'printf'. > > <snip> > > Hello Rob and rest of the list... > > When would you use print, when printf and why?
The code in question was printf OUT "$in1$in2\n" I thought 'printf' was wrong because it wasn't using print formatting at all: the scalar variables would be interpolated into the (then constant) format string. It make sense to me to write either print OUT "$in1$in2\n" or printf OUT "%s%s\n", $in1, $in2 but not a combination of the two. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]