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 / fe...@crowfix.com
  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

Reply via email to