![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Recently I discovered that foo() evaluates in array context in "${\foo()}", e.g.
I would have expected that the $ sigil would have biased "${...}" towards a scalar context since the obvious value inside of {...} would naturally be a scalar reference. Thus the thing that "\" takes a reference from should be presumed to be a scalar. Apparently this is not so. I'm wondering if any of the Perl language design/internals gurus here would care to enlighten me? Perl generally tries to "do what is expected" (by the programmer). What was the expected understanding that behind the current behavior? Thanks in advance, beth In reply to Why does foo() evaluate in array context in "${\foo()}"? by ELISHEVA
|
|