in reply to Re: What should be returned in scalar context?
in thread What should be returned in scalar context?
As for return @array; - that made sense to me when I was writing a function that I needed in list context and didn't want to think through scalar context. So I left it with the easiest behaviour to implement, knowing full well that it wouldn't do anything useful in scalar context, meaning that if I ever called it in scalar context then I would have motivation to fix it with some supposition about what it should do in scalar context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: What should be returned in scalar context?
by Juerd (Abbot) on Dec 02, 2003 at 16:45 UTC |