New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"${\ ... }" gives list context. #1205
Comments
From @AbigailCreated by @AbigailI've reported this many moons ago, but the bug is still present: $ perl -wle 'sub foo {wantarray ? "ARRAY" : "SCALAR"} print "${\foo}"' It should print "SCALAR". Perl Info
|
From @gsarOn 22 Feb 2000 06:11:19 GMT, abigail@delanet.com wrote:
It may have to be called a feature. \ attempts to distribute into Sarathy |
From [Unknown Contact. See original ticket]Gurusamy Sarathy <gsar@ActiveState.com> wrote
That's completely irrelevant. It should evaluate its argument in the Note that \@x, \%x and \&x have to be treated as special cases. But Note perlfaq4/How do I expand function calls in a string? says: If you prefer scalar context, similar chicanery is also print "That yields ${\($n + 5)} widgets\n"; Version 5.004 of Perl had a bug that gave list context to If only ... Mike Guy |
From [Unknown Contact. See original ticket]
I believe this little excerpt originally derives at least from --tom |
From @gsarOn Wed, 23 Feb 2000 15:10:02 GMT, "M.J.T. Guy" wrote:
Try implementing that, and please send me the patch when you've finished Sarathy |
From @jhiI'm marking the problem ticket as resolved. |
@jhi - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#2179 (status was 'resolved')
Searchable as RT2179$
The text was updated successfully, but these errors were encountered: