Created
December 16, 2017 18:01
-
-
Save mephinet/fbdeff254e00d3fa4a8df6beb90f0064 to your computer and use it in GitHub Desktop.
Test what wantarray return when called as second parameter to or
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
use strict; | |
use warnings; | |
my $some_cond = 0; | |
sub method { | |
my $wa = wantarray(); | |
die "wantarray = $wa" if defined $wa; | |
} | |
$some_cond or method(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment