Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 48390d5aff
Fetching contributors…

Cannot retrieve contributors at this time

executable file 33 lines (28 sloc) 0.536 kb
use v5;
use strict;
use feature 'say';
package Main;
say '1..3';
my $a = sub () {
do { 5 }
};
if ($a->() != 5) {
print 'not '
}
say 'ok 1 - do inside function';
$a = sub () {
return do { 5 };
4;
};
if ($a->() != 5) {
print 'not '
}
say 'ok 2 - do inside function';
$a = sub () {
do { return 5 };
4;
};
if ($a->() != 5) {
print 'not '
}
say 'ok 3 - do inside function';
Jump to Line
Something went wrong with that request. Please try again.