Re: Huh? 4=3?

[email protected]
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On Wed, May 08, 2013 at 06:22:09PM -0700, James Marshall wrote:
> It shows 6 because a comma-separated literal list, when interpreted as a
> scalar, evaluates to the final value in the list, not the length of the
> list.  If you evaluate "scalar(1,2,,4,,7)", it will equal 7.  That's the
> comma operator at work-- even though it looks like a list (and both use
> commas), it's really just a sequential set of expressions.

I think I've forgotten more useless perl trivia than I should have...
I use the comma operator sometimes, but never inside scalar().  Didn't
recognize it.  TMTOWTMakeAMess.

-- 
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / [email protected]
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.