On 12 April 2010 07:55, Uri Guttman <u...@stemsystems.com> wrote: >>>>>> "PP" == Philip Potter <philip.g.pot...@gmail.com> writes: > > PP> On 12 April 2010 04:31, Uri Guttman <u...@stemsystems.com> wrote: > >>>>>>> "AM" == Abimael Martinez <abijr....@gmail.com> writes: > >> > >> AM> print {$tmp} "$div_start"; > >> > >> no need for the {} around a single scalar handle. > > PP> But it *does* comply with Perl Best Practices #136. > > PP> * It makes the filehandle obviously different from the other arguments > PP> * It makes you less likely to accidentally put a wrong comma in: > PP> print {$tmp}, $div_start; > PP> * If you forget a comma on a print statement where you just meant to > PP> print to STDOUT, it stands out as being wrong: > PP> print $arg1 $arg2; # should have been print $arg1, $arg2; or print > PP> {$arg1} $arg2 > PP> * IOW, it forces you to be more explicit about when you are printing > PP> to a fh and when you are printing to STDOUT. > > PP> So there's at least 2 other people out there (Damian and me) who think > PP> the OP's version is reasonable. > > and did you see my much shorter answer with no file handles at all??
How is that relevant to my point? > and PBP isn't always right. it is meant as a list of interesting > suggestions to pick and choose from. read the intro to get that. also > note that i was one of the tech editors of that book. i know it > well. and i disagree with some of it too. damian is fine with that. :) Where did I say PBP was always right? I just didn't want to let your style argument be the only one in this thread, since there are clearly people who disagree with you, too. TIMTOWTDI. Phil -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/