>>>>> "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?? 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. :) uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/