Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: alpha
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (22 sloc) 0.384 kB
#!./parrot perl6.pbc
# check inline PIR
use v6;
say '1..4';
## inline directly
q:PIR { say 'ok 1' };
## assigned to a variable
my $a = q:PIR { %r = box 'ok 2' };
say $a;
## within a subroutine
sub foo($x) {
q:PIR {
$P0 = find_lex '$x'
say $P0
}
}
foo('ok 3');
## as the result of a return
sub bar() {
return q:PIR { %r = box 'ok 4' };
}
say bar();
Jump to Line
Something went wrong with that request. Please try again.