in reply to What should be returned in scalar context?
I don't think there should be a "standard". That's why this particular feature is in the hands of the programmer; so that they can make the decision about what's best. Sometimes you want to return the first element of an array in scalar context, sometimes you want to return something else.
Why do you think that there should be some standard?
Also, you have completely ignored void context. wantarray returns 3 things you know. Do you think that there should be some "standard" for what to do in void context too?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: What should be returned in scalar context?
by tilly (Archbishop) on Dec 02, 2003 at 16:14 UTC | |
by duff (Parson) on Dec 02, 2003 at 16:31 UTC |