in reply to Re: How to enforce void context in Reply?
in thread How to enforce void context in Reply?

Further to kcott's reply above, here's an experiment that may make the operation of function call return context more clear:

c:\@Work\Perl\monks>perl -wMstrict -le "sub S { print ! defined wantarray ? 'void' : wantarray ? 'list' : 'sc +alar'; } ;; sub T { print 'non-return: '; S; print 'return: '; S; } ;; sub U { print 'SCALAR ----'; my $scalar = T; print ''; print 'LIST ----'; my @ra = T; print ''; print 'VOID ----'; T; print ''; } ;; U; " SCALAR ---- non-return: void return: scalar LIST ---- non-return: void return: list VOID ---- non-return: void return: void
See also wantarray and Context in Perl.


Give a man a fish:  <%-(-(-(-<