On Jun 7, Karen Cravens said:

>On 7 Jun 2001, at 15:16, Jeff 'japhy' Pinyan wrote:
>
>> They enforce stringification.  This can be a problem when printing arrays,
>> or sending references to functions:
>
>'Course, they can be a bennie when printing arrays (of words, 
>usually), too:
>
>print @array; # why's it all smooshed together?
>
>print "@array"; # okay, that's readable.
>
>Mostly I use that when I'm tossing in a quick'n'dirty debug line, 
>though. Although then I feel like an idiot when I'm saying "But it 
>looks right" and later learning that the problem was @array = ("one 
>two three") instead of ("one", "two", "three")...

Well, of course it can be useful.  That's why it's there. ;)

But the problem is that people don't know WHAT stringification is.  They
are never told that "@foo" is really join($", @foo), and so they just
assume Perl is going to do what they mean, when Perl is really doing what
is documented.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
**      Manning Publications, Co, is publishing my Perl Regex book      **

Reply via email to