in reply to Re: subroutines & functions
in thread subroutines & functions
For your question I think you just need to check if the return value from wantarray is defined.I rarely, if ever, care about the difference between scalar and void context. To me, and I think to perl, too, void context is a special case of scalar context. Hence, undef is false, too. I definitely don't care about the difference between returning a scalar or not returning anything, and most certainly not for "efficiency reasons": that extra test likely wastes more time than returning and wasting a scalar value ever would.
I do care about the difference between list context and scalar context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: subroutines & functions (wrong place)
by tye (Sage) on Jun 23, 2003 at 04:15 UTC |