Help for this page

Select Code to Download


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