- or download this
#!/usr/bin/perl
wantarray
...
wantarray
? qw( ciao a tutti )
: defined wantarray && "howdy!";
- or download this
wantarray undefined!
- or download this
#!/usr/bin/perl
use strict;
...
print "\nThird: scalar context\n";
my $c = do '/tmp/prova1.pl';
print "scalar \$c = $c\n";
- or download this
First: list context
wantarray!
...
Third: scalar context
wantarray defined but false
scalar $c = howdy!