Mr. Shawn H. Corey wrote:
On Mon, 2008-10-13 at 14:04 +0100, Rob Dixon wrote:
A program with arrays that are tied in one place and not in another
has bigger
problems than this anyway. But I don't see a problem with using $"
with tied
arrays, unless the tied class happens to overload stringification.

  print join(',', @array), "\n";

is a lot noisier and IMO clumsier than

  {
    local $" = ',';
    print "@array\n";
  }

and after all, even if you don't know what $" does it's very simple to
look it
up and also easy to remember.

I disagree.  Remembering what all these cussing variables do is not
easy.  Just because you know what they are, doesn't imply that anyone
who has to maintain your code will know.  Use English or use join.

use English;
{
  local $LIST_SEPARATOR = ',';
  print "@array\n";
}

Please don't recommend that beginner programmers use English without supplying the caveat that it may break/slow down working code.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to