in reply to wantarray like wanthash

"wantarray" is really a misnomer. It should be called "wantlist" because what it determines is if the calling context is list, scalar, or void.

You're looking for Contextual::Return.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?