in reply to check for wantarray?
which is sometimes context-sensitive? I suppose you could mark a sub context-sensitive if it is for at least one set of parameters, but that might have limited value.sub bizarre { if ($_[0] eq "context-sensitive") { return wantarray?["sna","fu"]:"snafu"; } else { return "bar"; } }
|
|---|