Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: Pittsburgh
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (22 sloc) 0.384 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!./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();
Something went wrong with that request. Please try again.