in reply to Re: mystery function & Odd number of elements in anonymous hash
in thread mystery function & Odd number of elements in anonymous hash
I delved into the source code, and I believe the offending function ends with return wantarray ? @values : $values[0];.
So hash building is in list context; the fat comma doesn't change a thing. Why not? Are my options to force scalar context, or append "|| 0" for a default value?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: mystery function & Odd number of elements in anonymous hash
by Corion (Patriarch) on Jul 17, 2011 at 19:31 UTC | |
by Anonymous Monk on Jul 17, 2011 at 19:49 UTC | |
|
Re^3: mystery function & Odd number of elements in anonymous hash
by CountZero (Bishop) on Jul 17, 2011 at 19:57 UTC | |
by Anonymous Monk on Jul 17, 2011 at 20:34 UTC | |
by JavaFan (Canon) on Jul 17, 2011 at 22:17 UTC | |
by CountZero (Bishop) on Jul 18, 2011 at 16:24 UTC | |
by Anonymous Monk on Jul 18, 2011 at 21:18 UTC | |
by chromatic (Archbishop) on Jul 18, 2011 at 21:30 UTC |