On Tuesday, Nov 26, 2002, at 06:35 US/Pacific, Mystik Gotan wrote:
I can't really figure out what the purpose of wantarray() is.
Can someone please give me a good, decent explanation?
Thanks in advance :-)
my $scalar = funk(@args);
my @array = funk(@args);
if you use
return wantarray ? @a
Well there is the obvious place to start (perldoc -f wantarray):
wantarray
Returns true if the context of the currently
executing subroutine is looking for a list value.
Returns false if the context is looking for a
scalar. Returns the unde