in reply to Re: Re: Re: What should be returned in scalar context?
in thread What should be returned in scalar context?
I haven't thought through how this would be done, but one way might be to return 'SCALAR/STRING' and 'SCALAR/NUMERIC' respectively in the case of your two if statements.
Sounds like a good use of junctions:
if( want() eq all( 'SCALAR', 'STRING' ) ) { . . . }
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: What should be returned in scalar context?
by BrowserUk (Patriarch) on Dec 02, 2003 at 22:50 UTC |