- or download this
my @arr2=do {wantarray
? print("wantarray!\n")
...
? qw( ciao a tutti )
: defined wantarray && "howdy!";
};
- or download this
my $sc2=wantarray
? print("wantarray!\n") && qw(ciao a tutti)
: defined wantarray
? print("wantarray defined but false\n") && "howdy!"
: print("wantarray undefined!\n");
- or download this
sub wanttest {
wantarray
...
my @arr=wanttest();
print "Returned @arr \n\n";