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";
}


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Linux is obsolete.
-- Andrew Tanenbaum


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


Reply via email to