Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created September 27, 2017 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/eb41060509502bf3b5345fe6c8a0d61c to your computer and use it in GitHub Desktop.
Save Whateverable/eb41060509502bf3b5345fe6c8a0d61c to your computer and use it in GitHub Desktop.
greppable6
File Code
7ojo/perl6-platform
…/Container.pm6 :36:
run <docker build -t>, self.name, @args, <.>, :cwd«$.dockerfile-loc»;
Altai-man/p6-Texas-To-Uni
…/Uni.pm6 :13:
"<<", "\«",
Altai-man/p6-Texas-To-Uni
…/test-file1.p6 :36:
($head.comb «~» $msg.comb(/. ** 8/)).join('') ~ $tail;
CIAvash/App-Football
…/Football.pm6 :115:
my @cols = «Team 'Short Name' Code 'Squad Value'»;
CIAvash/App-Football
…/Football.pm6 :129:
my @cols = «Day 'Home Team' HG AG 'Away Team' Status 'Date & Time'»;
CurtTilmes/Perl6-GraphQL
…/GraphiQL.pm :11:
our $GraphiQL is export = Q«
MadcapJake/Test-Lab
…/020-experiment.t :536:
ok $before, '«before» should have run';
MadcapJake/Test-Lab
…/020-experiment.t :537:
ok $cont-ok, 'control should have run after «before»';
MadcapJake/Test-Lab
…/020-experiment.t :538:
ok $cand-ok, 'candidate should have run after «before»';
MadcapJake/Test-Lab
…/020-experiment.t :551:
nok $before, '«before» should not have run';
MadcapJake/Test-Lab
…/020-experiment.t :554:
}, '«before» block';
MadcapJake/Test-Lab
…/040-observation.t :18:
is $ob.value, 'ret', 'value is «ret»';
MadcapJake/Test-Lab
…/040-observation.t :19:
nok $ob.did-die, '«did-die» returns False';
MadcapJake/Test-Lab
…/040-observation.t :20:
is-approx $ob.duration, 0.1, 0.05,'«duration» "is-approx" 0.1 seconds';
MadcapJake/Test-Lab
…/040-observation.t :21:
# ok ($ob.duration - 0.1) ~~ 0..0.05, '«duration» "is-approx" 0.1 seconds';
Mouq/HTML-Entity
…/generate_entities_module.p6 :9:
say qq« '{.key}' => \{»;
Mouq/HTML-Entity
…/generate_entities_module.p6 :12:
qq«'{.key}'=> "\\x[» ~ .value.map(*.base(16)).join(',') ~ q«]",»
Mouq/HTML-Entity
…/generate_entities_module.p6 :15:
say qq« \},»;
Mouq/json5
…/01-parse.t :205:
ok $parsed, "JSON string «$desc» parsed";
Mouq/json5
…/01-parse.t :216:
nok $parsed, "NOT parsed «$desc»";
Mouq/json5
…/02-structure.t :65:
"Correct data structure for «{$p.key.subst(/\n/, '\n', :g)}»";
Mouq/json5
…/03-unicode.t :15:
is-deeply $o.ast, $p.value, "Correct data structure for «{$p.key}»"
Perl6-Noise-Gang/p6-Music-Helpers
…/Helpers.pm :161:
multi infix:«>»(Note:D $lhs, Note:D $rhs --> Bool) is export {
Perl6-Noise-Gang/p6-Music-Helpers
…/Helpers.pm :165:
multi infix:«<»(Note:D $lhs, Note:D $rhs --> Bool) is export {
Skarsnik/gptrixie
…/Class.pm6 :64:
return "Typedef<$!name>->«" ~ $.ref-type.Str ~ "»";
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :61:
return [+] $a.coeffs »*« $b.coeffs;
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :68:
return $a.new: ( [+] @a_rijk »*« ( $r, -$i, -$j, -$k ) ), # real
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :69:
( [+] @a_rijk »*« ( $i, $r, $k, -$j ) ), # i
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :70:
( [+] @a_rijk »*« ( $j, -$k, $r, $i ) ), # j
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :71:
( [+] @a_rijk »*« ( $k, $j, -$i, $r ) ); # k
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :75:
return [+] ( @list »*« @list );
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :85:
multi sub infix:<eqv> ( ::?CLASS $a, ::?CLASS $b ) is export { [and] $a.coeffs »==« $b.coeffs }
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :90:
multi sub infix:<+> ( ::?CLASS $a, ::?CLASS $b ) is export { $a.new:
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :95:
multi sub infix:<-> ( ::?CLASS $a, ::?CLASS $b ) is export { $a.new:
Util/Perl6-Math-Quaternion
…/Quaternion.pm6 :96:
multi sub prefix:<-> ( ::?CLASS $a ) is export { $a.new:
andydude/p6-c-parser
…/Actions.pm6 :164:
method postfix-expression-rest:sym«->»($/) {
andydude/p6-c-parser
…/Actions.pm6 :278:
method shift-operator:sym«<<»($/) {
andydude/p6-c-parser
…/Actions.pm6 :281:
method shift-operator:sym«>>»($/) {
andydude/p6-c-parser
…/Actions.pm6 :289:
method relational-operator:sym«<»($/) {
andydude/p6-c-parser
…/Actions.pm6 :292:
method relational-operator:sym«>»($/) {
andydude/p6-c-parser
…/Actions.pm6 :295:
method relational-operator:sym«<=»($/) {
andydude/p6-c-parser
…/Actions.pm6 :298:
method relational-operator:sym«>=»($/) {
andydude/p6-c-parser
…/Actions.pm6 :389:
method assignment-operator:sym«<<=»($/) {
andydude/p6-c-parser
…/Actions.pm6 :392:
method assignment-operator:sym«>>=»($/) {
andydude/p6-c-parser
…/Grammar.pm6 :233:
rule postfix-expression-rest:sym«->» { <sym> <ident> }
andydude/p6-c-parser
…/Grammar.pm6 :303:
rule shift-operator:sym«<<» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :304:
rule shift-operator:sym«>>» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :312:
rule relational-operator:sym«<» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :313:
rule relational-operator:sym«>» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :314:
rule relational-operator:sym«<=» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :315:
rule relational-operator:sym«>=» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :385:
rule assignment-operator:sym«<<=» { <sym> }
andydude/p6-c-parser
…/Grammar.pm6 :386:
rule assignment-operator:sym«>>=» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :366:
token punct:sym«->» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :377:
token punct:sym«<<» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :378:
token punct:sym«>>» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :379:
token punct:sym«<» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :380:
token punct:sym«>» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :381:
token punct:sym«<=» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :382:
token punct:sym«>=» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :399:
token punct:sym«<<=» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :400:
token punct:sym«>>=» { <sym> }
andydude/p6-c-parser
…/Lexer.pm6 :410:
##token header-name:sym<angle> { <.punct:sym«<»> <h-char-sequence> <.punct:sym«>»> }
atweiden/txn-parser
…/Actions.pm :28:
# to aid with building exchange rates (@ and @@, « and ««)
atweiden/txn-parser
…/Grammar.pm :737:
token inherit-symbol-char:unicode { '«' }
atweiden/txn-parser
…/01-ledger.t :353:
Assets:Personal:ColdStorage ฿5 BTC @ $466 USD « $0.04 USD
atweiden/txn-remarshal
…/Remarshal.pm :368:
my Str:D $s = '« ';
avuserow/perl6-compress-snappy
…/snappy.t :28:
roundtrip-test '»ö« .oO(æ€!éè)' x 100, '100 strings with unicode characters';
awwaiid/p6-Inline-Ruby
…/README.md :75:
# in «...»:rb. So when you see that, you know you are looking at a wrapped
awwaiid/p6-Inline-Ruby
…/README.md :78:
say '5':rb; #=> «5»:rb
awwaiid/p6-Inline-Ruby
…/README.md :82:
say '5':rb + 2 #=> «7»:rb
awwaiid/p6-Inline-Ruby
…/README.md :92:
#=> «[["id", "name"], ["1", "andy"], ["2", "bella"], ["3", "chad"], ["4", "dua"]]»:rb
awwaiid/p6-Inline-Ruby
…/README.md :99:
#=> «[{"type"=>"ClutterGroup", "id"=>"actor", ... }]»:rb
awwaiid/p6-Inline-Ruby
…/README.md :105:
say $data.length #=> «2»:rb
awwaiid/p6-Inline-Ruby
…/README.md :106:
say $data[0]["type"] #=> «ClutterGroup»:rb
awwaiid/p6-Inline-Ruby
…/README.md :107:
say $data[0]<type> #=> «ClutterGroup»:rb
awwaiid/p6-Inline-Ruby
…/README.md :112:
say $data[0]<children>[1]<depth> #=> «20.0»:rb
awwaiid/p6-Inline-Ruby
…/README.md :117:
"[1,2,3]":rb.map: -> $n { 1 + $n } #=> «2, 3, 4»:rb
awwaiid/p6-Inline-Ruby
…/Ruby.pm6 :133:
$*ERR.say: "P6→RB WARNING: NOT creating proxy for class «$module»:rb (class already defined)";
awwaiid/p6-Inline-Ruby
…/Ruby.pm6 :137:
# say "Creating proxy for class «$module»:rb";
awwaiid/p6-Inline-Ruby
…/RbObject.pm6 :32:
"«{ $.value }»:rb"
awwaiid/p6-Inline-Ruby
…/sweet.t :23:
is $data.gist, '«[["id", "name"], ["1", "andy"], ["2", "bella"], ["3", "chad"], ["4", "dua"]]»:rb', 'Gist generates deep data';
awwaiid/p6-Inline-Ruby
…/sweet.t :28:
is $data.length.gist, '«2»:rb', 'Method invocation';
awwaiid/p6-Inline-Ruby
…/sweet.t :29:
is $data[0]["type"].gist, '«ClutterGroup»:rb', 'Array method index';
awwaiid/p6-Inline-Ruby
…/sweet.t :30:
is $data[0]<type>.gist, '«ClutterGroup»:rb', 'Hash method index alias';
awwaiid/p6-Inline-Ruby
…/sweet.t :36:
is $inclist.gist, '«[2, 3, 4]»:rb', 'Map with block';
azawawi/farabi6
…/gfm.js :95:
if (stream.match(/^((?:[a-z][\w-]+:(?:\/{1,3}
cedric-vincent/kains
…/Parameters.pm6 :74:
examples => « ~/rootfs/centos-6-x86
cedric-vincent/kains
…/Parameters.pm6 :105:
examples => « '~/my_hosts /etc/hosts'
cedric-vincent/kains
…/Parameters.pm6 :120:
examples => « /tmp
cedric-vincent/kains
…/Parameters.pm6 :205:
examples => « emacs
cedric-vincent/kains
…/01-basic.t :31:
is App::Kains::start(« sh -c 'exit 123' »), 123, 'execute a shell';
cedric-vincent/kains
…/01-basic.t :33:
is App::Kains::start(« -- sh -c 'exit 123' »), 123, 'use -- option';
cedric-vincent/kains
…/01-basic.t :36:
is App::Kains::start(« $_ /usr/bin/true /usr/bin/false /usr/bin/false »), 0, "use $_ option"
cedric-vincent/kains
…/01-basic.t :40:
is App::Kains::start(« $_ / true »), 0, "use $_ option"
cedric-vincent/kains
…/01-basic.t :44:
is App::Kains::start(« $_ /dev true »), 0, "use $_ option"
cedric-vincent/kains
…/01-basic.t :48:
is App::Kains::start(« $_ /dev sh -c 'pwd
cedric-vincent/kains
…/01-basic.t :52:
is App::Kains::start(« $_ sh -c 'id -u
cedric-vincent/kains
…/01-basic.t :53:
is App::Kains::start(« $_ sh -c 'id -g
cedric-vincent/kains
…/01-basic.t :57:
is App::Kains::start(« $_ true' »), 0, "use $_ option";
cedric-vincent/kains
…/01-basic.t :58:
is App::Kains::start(« $_ true' »), 0, "use $_ option";
cedric-vincent/kains
…/01-basic.t :62:
is App::Kains::start(« $_ sh -c 'uname -m
cedric-vincent/kains
…/01-basic.t :67:
is App::Kains::start(« -S / sh -c 'id -g
cedric-vincent/kains
…/01-basic.t :70:
is App::Kains::start(« -B /dev $nonexistent-path test -d $nonexistent-path »), 0,
cedric-vincent/kains
…/03-bug.t :44:
is App::Kains::start(« -B $tmp-does-exist $tmp-does-not-exist true »), 0,
cedric-vincent/kains
…/03-bug.t :47:
is App::Kains::start(« -B $tmp-does-exist "/tmp/$tmp-does-not-exist-too/whatever" true »), 0,
cedric-vincent/kains
…/03-bug.t :60:
is App::Kains::start(« -B /etc $tmp2 -B /bin $tmp2 -B $tmp1 $tmp2 test -e "$tmp2/$tmp" »), 0,
cedric-vincent/kains
…/03-bug.t :63:
is App::Kains::start(« -B /etc "$tmp1/$tmp" -B $tmp2 $tmp1 test -e "$tmp1/$tmp/fstab" »), 0,
coke/p6-uni
…/Uni.pm :23:
@regexes.push(/« <$re> »/);
coke/p6-uni
…/Uni.pm :30:
@regexes.push(/« <$string> »/);
coke/p6-uni
…/basic.t :8:
my $proc = run($*EXECUTABLE, '-I' «~« @include, './bin/uni',
colomon/ABC
…/playing.pl :6:
my $abc = q«X:64
colomon/ABC
…/01-regexes.t :419:
my $music = q«A/B/c/A/ +trill+c>d e>deg
colomon/ABC
…/01-regexes.t :430:
my $music = q«% Comment
colomon/ABC
…/01-regexes.t :446:
my $music = q«X:64
colomon/ABC
…/01-regexes.t :469:
my $music = q«X:1
colomon/ABC
…/01-regexes.t :500:
my $music = q«X:1
colomon/ABC
…/01-regexes.t :530:
my $music = q«X:1
colomon/ABC
…/05-actions.t :213:
my $music = q«X:64
colomon/ABC
…/05-actions.t :253:
my $music = q«BAB G2G
colomon/ABC
…/05-actions.t :272:
my $music = q«BAB G2G
colomon/ABC
…/05-actions.t :288:
my $music = q«X:044
colomon/ABC
…/05-actions.t :318:
my $music = q«X:1
colomon/Math-Vector
…/Vector.pm :41:
[+]($a.coordinates »*« $b.coordinates);
colomon/Math-Vector
…/Vector.pm :79:
Math::Vector.new($a.coordinates »+« $b.coordinates);
colomon/Math-Vector
…/Vector.pm :84:
Math::Vector.new($a.coordinates »-« $b.coordinates);
colomon/Math-Vector
…/01-basics.t :192:
# self.bless(*, coordinates => @x, length => sqrt [+] (@x »*« @x));
colomon/Math-Vector
…/01-basics.t :197:
# self.bless(*, coordinates => @x, length => sqrt [+] (@x »*« @x));
cosimo/perl6-digest-md5
…/MD5.pm :8:
sub infix:«<<<»(\x, \n) { (x +< n) % 2**32 +
cosimo/perl6-digest-md5
…/MD5.pm :48:
@H «⊞=» ($A, $B, $C, $D);
drforr/perl6-ANTLR4
…/vhdl.g4 :1620:
drforr/perl6-Perl6-Parser
…/Factory.pm6 :1870:
# « »
drforr/perl6-Perl6-Parser
…/Factory.pm6 :3228:
# « »
drforr/perl6-Perl6-Parser
…/Factory.pm6 :3247:
# « »
drforr/perl6-Perl6-Parser
…/Factory.pm6 :4519:
# « »
drforr/perl6-Perl6-Parser
…/999-regression.t :136:
bag +« flat @a».comb: 1
drforr/perl6-Perl6-Parser
…/999-regression.t :193:
("a".comb «~» "a".comb);
drforr/perl6-Perl6-Parser
…/999-regression.t :273:
1 given [\+] '\\' «leg« $s.comb;
drforr/perl6-Perl6-Parser
…/rosetta-a.t :474:
(all «the that a»),
drforr/perl6-Perl6-Parser
…/rosetta-a.t :475:
(all «frog elephant thing»),
drforr/perl6-Perl6-Parser
…/rosetta-a.t :476:
(all «walked treaded grows»),
drforr/perl6-Perl6-Parser
…/rosetta-a.t :477:
(all «slowly quickly»);
drforr/perl6-Perl6-Parser
…/rosetta-a.t :695:
$png.set:
drforr/perl6-Perl6-Parser
…/rosetta-b.t :64:
($head.comb «~» $msg.comb(/. ** 8/)).join('') ~ $tail;
drforr/perl6-Perl6-Parser
…/rosetta-b.t :119:
given [\+] '\\' «leg« $s.comb;
drforr/perl6-Perl6-Parser
…/rosetta-b.t :297:
sub benford(@a) { bag +« flat @a».comb: /<( <[ 1..9 ]> )> <[ , . \d ]>*/ }
drforr/perl6-Perl6-Parser
…/rosetta-b.t :713:
join "\n", «P3 "$.width $.height" 255»,
drforr/perl6-Perl6-Parser
…/operators.t :241:
# Whitespace sensitive between 'a' and '«' '»'
drforr/perl6-Perl6-Parser
…/operators.t :242:
my $source = Q{my%a;%a«foo»};
drforr/perl6-Perl6-Parser
…/operators.t :253:
# Whitespace sensitive between 'a' and '«' '»'
drforr/perl6-Perl6-Parser
…/operators.t :255:
my %a; %a« foo »
drforr/perl6-Perl6-Parser
…/operators.t :265:
}, Q{%a«»};
fjwhittle/p6-Path-Map
…/Map.pm6 :95:
#
fjwhittle/p6-Path-Map
…/Map.pm6 :96:
#
fjwhittle/p6-Path-Map
…/validation.t :41:
$mapper.add_handler('pony/:breed', 'Magical', :breed( -> $breed is rw { $breed = :unicorn«$breed»; }));
gfldex/perl6-concurrent-file-find
…/Find.pm6 :6:
"«$.path» is not a directory"
gfldex/perl6-concurrent-file-find
…/Find.pm6 :13:
"Cannot access «$.path»: permission denied"
gfldex/perl6-concurrent-file-find
…/Find.pm6 :20:
"Stale symlink «$.path»"
gfldex/perl6-git-config
…/Config.pm6 :17:
my @fs = $file // ($*HOME «~« </.gitconfig /.config/git/config>);
gfldex/perl6-git-config
…/Config.pm6 :18:
my $cfg-handle = ([//] try (@fs».IO».open)) // warn("Can not find gitconfig at any of {('⟨' «~« @fs »~» '⟩').join(', ')}");
gfldex/perl6-meta6-bin
…/bin.pm6 :490:
my $display-name = ('⟨' ~ $base-dir «~« '/' «~« @files »~» '⟩').join(', ');
gfldex/perl6-pod-to-bigpage
…/html.xhtml :246:
say %calories«$key»; # Perl 6 - double angles interpolate as a list of Str</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :252:
say join ',', %calories«$keys»; # Perl 6 the split is done after interpolation</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :735:
my $captured = run(«echo "$arg"», :out).out.slurp-rest;</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4239:
# OUTPUT«foo␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4247:
# OUTPUT«Sa 03.06.2016»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4315:
# OUTPUT«X::Multi::NoMatch.new(dispatcher …</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4319:
# OUTPUT«42␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4325:
# OUTPUT«Failure.new(exception =&gt; X::AdHoc.new(payload =&gt; "wut?"),
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4334:
} # OUTPUT«once␤manymanymany»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4342:
OUTPUT«still kaput! [...]␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4452:
# OUTPUT«99999␤oh no␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :4893:
dd &amp;amp;s.signature # OUTPUT«:(*@_, *%_)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :5033:
OUTPUT«42␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :5082:
# OUTPUT«wrapping testee with arguments :(Int $i, Str $s)»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :5085:
# OUTPUT«calling testee with \(10, "ten")␤returned from testee with return value "6.151190ten"␤6.151190ten»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :5088:
# OUTPUT«6.151190ten␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :5123:
# OUTPUT«True␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :5453:
[16:28:28] &amp;lt;+camelia&gt; rakudo-moar 812a48: OUTPUT«Hello world␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6017:
# OUTPUT«True␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6019:
# OUTPUT«(foo)()␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6032:
# OUTPUT«((1 2) (3 4))␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6035:
# OUTPUT«((1 2 3 4)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6050:
say @a.Set&amp;lt;bar buzz&gt;; # OUTPUT«(True True)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6051:
say so 'bar' ∈ @a; # OUTPUT«True␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6084:
# OUTPUT«(1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6140:
say @a[0..2]; # OUTPUT«(1 2 3)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6141:
say @a[0..^2]; # OUTPUT«(1 2)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6142:
say @a[0..*]; # OUTPUT«(1 2 3 4 5)␤␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6143:
say @a[0..^*]; # OUTPUT«(1 2 3 4 5)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6144:
say @a[0..Inf-1]; # OUTPUT«(1 2 3 4 5)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6204:
# OUTPUT«Array.new(:shape(2, 2), [Any, Any], [Any, Any])␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6206:
# OUTPUT«(2 2)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6211:
# OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 42])␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6467:
# OUTPUT«("DEFAULT", "ALL").Seq»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :6470:
# OUTPUT«("\&amp;amp;uri-escape", "\&amp;amp;uri_escape", "\&amp;amp;uri-unescape", "\&amp;amp;uri_unescape").Seq»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7045:
# OUTPUT«(Any)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7442:
<tr><td>L</td> <td>Method postfix</td> <td>.meth .+ .? .* .() .[] .{} .&lt;> .«» .:: .= .^ .:</td></tr>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7492:
circumfix:«( )»('a', 'b', 'c') # same as ('a', 'b', 'c')</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7544:
<p>Hyper operators apply a given operator enclosed by <span class="code">«</span> and <span class="code">»</span> to one or two lists, ret…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7547:
say (1, 2, 3) »+« (4, 5, 6); # (5 7 9)</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7553:
say !« @wisdom; # [False True False]
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7558:
<pre class="code">say -« [[1, 2], 3]; # [[-1 -2] -3]</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7567:
<tr><td>C&lt;%foo «+» %bar;></td> <td>intersection of keys</td></tr>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7568:
<tr><td>C&lt;%foo »+« %bar;></td> <td>union of keys</td></tr>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7572:
say %outer «~» %inner; # {"1" =&gt; "ax", "2" =&gt; "bz"}</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7581:
for $size «[r/]« (2**60, 2**50, 2**40, 2**30, 2**20, 2**10)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7595:
# OUTPUT: «10 EB 4 EB 2 PB 5 PB 0.5 PB 4 TB 300 GB 4.5 GB 50 MB 200 MB 9 KB 0.6 MB»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7684:
<p>See <a href="#_routine_[ ].pod6-postcircumfix_&lt;_&gt;"> <span class="code">postcircumfix &lt; ></span> </a> and <a href="#_routine_[ ].pod6-pos…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7692:
<a name="t25.15.4"></a><h2 id="_language_operators.pod6-postcircumfix_«_»">25.15.4 postcircumfix <span class="code">« »</span></h2>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7693:
<p>Shortcut for <a href="#_routine_[ ].pod6-postcircumfix_{_}"> <span class="code">postcircumfix { }</span> </a> that quotes its argument using the same rules as the <a href="#_routine_« ».pod6-circumfix_«_»">interpolating quote-words operator</a> of the same name.</p>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7696:
say %color«cherry $fruit».perl; #-&gt; ("red", "green")</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7712:
# OUTPUT«Int $invocant = 42␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :7714:
# OUTPUT«Int $invocant = 42␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8006:
<pre class="code">multi sub infix:«&amp;lt;=&gt;»($a, $b) returns Order:D is assoc&amp;lt;none&gt;</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8042:
<pre class="code">proto sub infix:«&amp;lt;»(Any, Any) returns Bool:D is assoc&amp;lt;chain&gt;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8043:
multi sub infix:«&amp;lt;»(Int:D, Int:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8044:
multi sub infix:«&amp;lt;»(Num:D, Num:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8045:
multi sub infix:«&amp;lt;»(Real:D, Real:D)</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8049:
<pre class="code">proto sub infix:«&amp;lt;=»(Any, Any) returns Bool:D is assoc&amp;lt;chain&gt;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8050:
multi sub infix:«&amp;lt;=»(Int:D, Int:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8051:
multi sub infix:«&amp;lt;=»(Num:D, Num:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8052:
multi sub infix:«&amp;lt;=»(Real:D, Real:D)</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8056:
<pre class="code">proto sub infix:«&gt;»(Any, Any) returns Bool:D is assoc&amp;lt;chain&gt;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8057:
multi sub infix:«&gt;»(Int:D, Int:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8058:
multi sub infix:«&gt;»(Num:D, Num:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8059:
multi sub infix:«&gt;»(Real:D, Real:D)</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8063:
<pre class="code">proto sub infix:«&gt;=»(Any, Any) returns Bool:D is assoc&amp;lt;chain&gt;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8064:
multi sub infix:«&gt;=»(Int:D, Int:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8065:
multi sub infix:«&gt;=»(Num:D, Num:D)
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8066:
multi sub infix:«&gt;=»(Real:D, Real:D)</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8338:
<pre class="code">sub infix:«=&gt;»($key, Mu $value) returns Pair:D</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8631:
rakudo-moar 8bd7ee: OUTPUT«0.0018558␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8636:
camelia prof-m 273e89: OUTPUT«hello world␤...»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :8970:
my $a = 42; say «"$a b" c».perl; # ("42 b", "c")</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :9116:
say %calories«$key»; # Perl 6 - double angles interpolate as double-quotes</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :9123:
say %calories«$keys».join(','); # Perl 6, interpolated split</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10586:
%hash«foo $var»; # same as %hash{ «foo $var» }
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10692:
# OUTPUT«Array @twodim = [("a", "b", "c"), (1, 2, 3)]␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10694:
# OUTPUT«("b", 2)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10698:
# OUTPUT«Array @toomany = [["a", "b"], [1, 2]]␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10700:
# OUTPUT«("a", "b", 1, 2)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10771:
# OUTPUT«False␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :10773:
# OUTPUT«1␤(Any)␤3␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11065:
dd $Foo::Bar::buzz; # OUTPUT«Int $v = 42␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11277:
<p>Wrap an infix operator in <span class="code">« »</span> (or the ASCII equivalent <span class="code"></span>) to create a new hyper operator that works pairwise on two lists.</p>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11278:
<pre class="code">&amp;lt;1 2 3&gt; «+» &amp;lt;4 5 6&gt; # &amp;lt;5 7 9&gt;</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11280:
<pre class="code">@a «+« @b # Result is the size of @b, elements from @a will be re-used
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11282:
@a «+» @b # Result is the size of the biggest input, the smaller one is re-used
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11283:
@a »+« @b # Exception if @a and @b are different sizes</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11285:
<pre class="code">-« &amp;lt;1 2 3&gt; # &amp;lt;-1 -2 -3&gt;</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11490:
<p><a href="#_type_Pair.pod6">Pair</a> objects can be created either with <span class="code">infix:«=>» </span> (which auto-quotes the lef…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11497:
«a b c»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11977:
say Q:c«{$a}()$b()»;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :11978:
OUTPUT«1()$b()␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12021:
say f; # OUTPUT«True␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12075:
# OUTPUT«True␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12087:
say A.new.WHAT; # OUTPUT«(A)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12088:
say A.new."WHAT"() # OUTPUT«ain't gonna happen␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12097:
say $a.i; # OUTPUT«answer␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12102:
# OUTPUT«(3, 2)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12113:
say C.new(B.new).m(); # OUTPUT«B::m has been called.␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12138:
# OUTPUT«(Any, Mu)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12147:
# OUTPUT«"A::from-a"␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12156:
dd $c; # OUTPUT«Int $c = 42␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12166:
<p>Versioning and authership can be applied via adverbs <span class="code">:ver&lt;></span> and <span class="code">:auth&lt;>. Both take a string as…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12169:
<p>Versioning and authership can be applied via adverbs <span class="code">:ver&lt;></span> and <span class="code">:auth&lt;>. Both take a string as…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12175:
say name1, ' ', name2; # OUTPUT«name1 name2»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12176:
say name1.value, ' ', name2.value; # OUTPUT«1 2␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12182:
say same(name1, name1); # OUTPUT«True␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12183:
say same(name1, name2); # OUTPUT«False␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12185:
say $a ~~ Names; # OUTPUT«True␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12186:
say $a.WHAT; # OUTPUT«Names␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12189:
dd Mass.enums; # OUTPUT«{:g(1.0), :kg(1000.0), :mg(0.001)}␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12192:
dd Numbers.enums; # OUTPUT«{:four(3), :one(0), :three(2), :two(1)}␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12194:
<pre class="code">enum Numbers «:one(1) two three four»;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12195:
dd Numbers.enums; # OUTPUT«{:four(4), :one(1), :three(3), :two(2)}␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12198:
say two; # OUTPUT«two()(Map)␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12199:
say one.WHAT; # OUTPUT«()␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12200:
say $e.WHAT; # OUTPUT«(Map)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12207:
say Mass.enums, g.enums; # OUTPUT«{g =&gt; 1, kg =&gt; 1000, mg =&gt; 0.001}{g =&gt; 1, kg =&gt; 1000, mg =&gt; 0.001}␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12210:
<pre class="code">say g.key; # OUTPUT«g␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12213:
<pre class="code">say g.value; # OUTPUT«1␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12218:
<pre class="code">say g.pair; # OUTPUT«g =&gt; 1␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12223:
<pre class="code">say g.kv; # OUTPUT«(g 1)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12227:
<p>Versioning and authorship can be applied via adverbs <span class="code">:ver&lt;></span> and <span class="code">:auth&lt;>. Both take a string as…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12237:
# OUTPUT«[v4.2.3 me@here.local]␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12242:
$i = -42; # OUTPUT«Type check failed in assignment to $i; expected Positive but got Int (-42)␤ …»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12246:
<p>Xorg includes digraph support using a <a href="https://en.wikipedia.org/wiki/Compose\_key#GNU.2FLinux"\> <i>Compose key</i> </a> . The default of <…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12279:
<tr><td>«</td> <td>U+00AB</td> <td>&lt;&lt;</td></tr>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12282:
<pre class="code">C« fixed-width POD text »
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12283:
say (1, 2) »+« (3, 4); # 4 6 ; element-wise add
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12285:
say «moo»; # moo
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12286:
my $baa = 123; say «$baa»; # 123</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12354:
<tr><td>«</td> <td>U+00AB</td> <td>&lt;&lt;</td> <td>v6.c</td> <td>as part of «» or .«</td></tr>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12355:
<tr><td>»</td> <td>U+00BB</td> <td>>></td> <td>v6.c</td> <td>as part of «» or .»</td></tr>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12442:
# OUTPUT «round␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12445:
# OUTPUT «Hash key out of range. Is: cherry, should be in (oranges bananas)␤ in method AT-KEY at failhash.p6 line 4 [...]»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12760:
dd @a; # «Array $var = $[:k1(3), :k2(3), :k3(3)]»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12767:
# OUTPUT«1␤2␤3␤4␤4␤3␤5␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12768:
# OUTPUT«2␤1␤3␤4␤5␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :12963:
# OUTPUT«===SORRY!=== Error while compiling &amp;lt;tmp&gt;␤Variable definition of type Int:D (implicit :D by pragma) requires an initializer ...
gfldex/perl6-pod-to-bigpage
…/html.xhtml :13207:
dd %h; # «Hash %h = {:a($[1])}␤» # please note the Array</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :13226:
say '231'.comb.sort(&amp;amp;infix:«&amp;lt;=&gt;»).join; # 123</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :13238:
# OUTPUT«[[2, 3, 4], [[5, 6], 7, 8]]␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :13245:
# OUTPUT«(1, (2, 3), 4)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :13977:
<pre class="code">say {1}.(); # OUTPUT«1␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :14037:
say f-g(2); # OUTPUT«g␤f␤2␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15006:
say ‘»ö«’.comb».uniname;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15007:
# «("RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK",
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15012:
# «ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15019:
<pre class="code">dd ‘»ö«’.comb».uniname;
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15020:
# «("RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK",
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15959:
# OUTPUT«("/home/camelia", "/usr/bin:/sbin:/bin")␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15963:
# OUTPUT«("round", "bendy")␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15965:
dd %h«oranges $fruit»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :15966:
OUTPUT«("round", "bendy")␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :17356:
# OUTPUT«True␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :17511:
.say for @a; # OUTPUT«G␤G␤A␤T␤C␤C␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :18766:
# OUTPUT«("a", "b", "c")␤(a b c)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :19001:
dd f(); # OUTPUT«any(1, 2, 3)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :19222:
<pre class="code">multi sub infix:«&amp;lt;=&gt;»(Int:D \a, Int:D \b) returns Order:D</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :19239:
dd %h; OUTPUT«Hash %h = {:bar(10)}␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :19440:
<p>Role for objects which support indexing them using <span class="code">postcircumfix:«[ ]»</span> (usually list-like objects). Example t…
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20424:
# OUTPUT«True␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20429:
# OUTPUT«match␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20433:
# OUTPUT«True␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20503:
# OUTPUT«ten10␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20520:
# OUTPUT«(Int)(Str)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20552:
# OUTPUT«[1]␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20554:
# OUTPUT«[1, 2, 3]␤»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20557:
# OUTPUT«["a", "b", "c"]␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20597:
f(
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20601:
f
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20604:
f
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20642:
# OUTPUT«10␤"answer"␤Any $b = Any␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :20650:
# OUTPUT«(Capture)␤(Int)(Str)␤»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21179:
"«".ord # 171</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21184:
<pre class="code">"aå«".ords # (97 229 171)</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21192:
$str.=trans( '&amp;lt;' =&gt; '«' );
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21193:
$str.=trans( '&amp;lt;' =&gt; '«', '&gt;' =&gt; '»' );
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21200:
"abcdefghij".trans(/&amp;lt;[aeiou]&gt; \w/ =&gt; ''); # «cdgh»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21202:
"a123b123c".trans(['a'..'z'] =&gt; 'x', :complement); # «axxxbxxxc»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21203:
"a123b123c".trans('23' =&gt; '', :delete); # «a1b1c»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21204:
"aaa1123bb123c".trans('a'..'z' =&gt; 'A'..'Z', :squash); # «A1123B123C»
gfldex/perl6-pod-to-bigpage
…/html.xhtml :21205:
"aaa1123bb123c".trans('a'..'z' =&gt; 'x', :complement, :squash); # «aaaxbbxc»</pre>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :23717:
<a href="#t25.15.4"><li class="toc-level toc-level-2"><span class="toc-number">25.15.4</span> postcircumfix <span class="code">« »</span></li></a>
gfldex/perl6-pod-to-bigpage
…/html.xhtml :25912:
<li>&emsp;<a href="#i36">36</a> <a href="#i37">37</a> <a href="#i215">215</a> <a href="#i224">224</a> <a href="#i225">225</a> <a href="#i228">228</a>…
gfldex/perl6-rakudo-slippy-semilists
…/README.md :17:
# OUTPUT«Hash %h = {"1" => ${"2" => ${"3" => 1}}}␤»
gfldex/perl6-rakudo-slippy-semilists
…/README.md :19:
# OUTPUT«Bool::True␤»
gfldex/perl6-slippy-semilist
…/README.md :18:
# OUTPUT«Hash %h = {"1" => ${"2" => ${"3" => 42}}}␤»
gfldex/perl6-slippy-semilist
…/README.md :20:
# OUTPUT«Bool::True␤»
gfldex/perl6-typesafe-xhtml-writer
…/Build.pm :10:
my $proc = run $*EXECUTABLE, '-I' «~« @include, "$where/bin/generate-function-definition.p6", "$where/3rd-party/xhtml1-strict.xsd", out => $out-file, :bin;
gfldex/perl6-xhtml-writer
…/Build.pm :10:
my $proc = run 'perl6', '-I' «~« @include, "$where/bin/generate-function-definition.p6", "$where/3rd-party/xhtml1-strict.xsd", out => $out-file, :bin;
grondilu/libdigest-perl6
…/Digest.pm :5:
sub infix:«<<<»(\x, \n) { (x +< n) % 2**32 +
grondilu/libdigest-perl6
…/Digest.pm :41:
@H «⊞=» ($A, $B, $C, $D);
grondilu/libdigest-perl6
…/SHA.pm :48:
@H «⊕=» ($A,$B,$C,$D,$E);
grondilu/libdigest-perl6
…/SHA.pm :59:
for 256 «**« reverse ^4 {
hipek8/p6-UNIX-Daemonize
…/04-creating-second-daemon.t :9:
daemonize(«rm $pidlockfile», :pid-file($pidlockfile)); # This won't start
hoelzro/p6-priorityqueue
…/README.md :29:
$p = PriorityQueue.new(:cmp(&infix:«>=»));
hoelzro/p6-priorityqueue
…/PriorityQueue.pm :101:
$p = PriorityQueue.new(:cmp(&infix:«>=»));
jsimonet/IRC-Client-Plugin-UserPoints
…/README.md :21:
<botte> jsimonet, Adding one point to botte in « main » category
jsimonet/IRC-Client-Plugin-UserPoints
…/README.md :23:
<botte> jsimonet, Adding one point to botte2 in « Perl6 » category
jsimonet/IRC-Client-Plugin-UserPoints
…/README.md :27:
<botte> jsimonet, « botte » has some points : 1 for main
jsimonet/IRC-Client-Plugin-UserPoints
…/README.md :28:
<botte> jsimonet, « botte2 » has some points : 1 in Perl6
jsimonet/IRC-Client-Plugin-UserPoints
…/UserPoints.pm6 :70:
!! "$operation-name one point to $user-name in « $category » category";
jsimonet/IRC-Client-Plugin-UserPoints
…/UserPoints.pm6 :97:
$e.reply: "« $user-name » does not have any points yet.";
jsimonet/IRC-Client-Plugin-UserPoints
…/UserPoints.pm6 :100:
my $response = "« $user-name » points: ";
jsimonet/dns-zone
…/full.db :71:
multilang tXt &é'-è_çà='…./§«»©↓¬¿×÷
jsimonet/dns-zone
…/todo :24:
- in lib/Zone.pm6, « splice » has an strange comportement, depending it is used in OO way, or not.
kalkin/Ddt
…/README.md :35:
ddt [--license-name=«NAME»] new <module> -- Create new module
kalkin/Ddt
…/Ddt.pm6 :125:
ddt [--license-name=«NAME»] new <module> -- Create new module
kalkin/License-Software
…/Abstract.pm6 :31:
return join "\n", ($.copyright «~» @.holders».name);
madcapjake/rabble
…/Lexicon.pm6 :34:
die "No such word «$old-name»" without self{$old-name};
masak/007
…/Actions.pm :782:
$value ~~ s[':«' ([ '\\»'
masak/007
…/Syntax.pm :311:
masak/007
…/Val.pm :529:
return "{$0}:«{escape-backslashes $1}»"
masak/007
…/custom-ops.t :485:
sub infix:«!»(l, r) {
masak/007
…/custom-ops.t :492:
outputs $program, "Mr. Bond\n", "can declare an operator with infix:«...»";
masak/007
…/custom-ops.t :571:
sub infix:«->»(lhs, rhs) {
masak/007
…/custom-ops.t :579:
"defining infix:«->» correctly installs a -> operator (#175)";
masak/007
…/expr.t :5:
my @exprs = «
masak/007
…/objects.t :6:
my @exprs = «
masak/007
…/stringification.t :10:
outputs 'say(infix:<\>>)', "<sub infix:«>»(lhs, rhs)>\n", "builtin sub (infix) -- contains > (I)";
masak/007
…/stringification.t :11:
outputs 'say(infix:«>»)', "<sub infix:«>»(lhs, rhs)>\n", "builtin sub (infix) -- contains > (II)";
moritz/Math-RungeKutta
…/RungeKutta.pm :83:
my $err = ([max] (@y-halfstep »-« @y-new)».abs) / $step;
moritz/json
…/01-parse.t :208:
ok $parsed, "JSON string «$desc» parsed";
moritz/json
…/01-parse.t :219:
nok $parsed, "NOT parsed «$desc»";
moritz/json
…/02-structure.t :65:
"Correct data structure for «{$p.key.subst(/\n/, '\n', :g)}»";
moritz/json
…/03-unicode.t :16:
is-deeply $got, $p.value, "Correct data structure for «{$p.key}»"
moritz/json
…/05-utf16.t :15:
"UTF-16 surrogate pair «$surrogate-pair» parses correctly";
moritz/svg-plot
…/parse-spectest-progress.pl :17:
warn "Can't parse line «$line»";
moritz/svg
…/basics.t :17:
ok $s ~~ /«rect»/, 'and the rest of the SVG is also present' or diag $s;
nobodyinperson/perl6-fortran-grammar
…/parse-fortran.pl6 :10:
# For some reason, plain «slurp» doesn't work. Might have to do
nobodyinperson/perl6-fortran-grammar
…/parse-fortran.pl6 :20:
say "### INPUT parsed as «$rule» ###" if $verbose;
p6-css/CSS-Declarations-p6
…/Units.pm :8:
my enum Scale is export(:Scale) « :pt(1.0) :pc(12.0) :px(.75) :mm(2.8346) :cm(28.346) :in(72.0) »;
p6-css/CSS-Grammar-p6
…/AST.pm :9:
our Str enum CSSObject is export(:CSSObject) «
p6-css/CSS-Grammar-p6
…/AST.pm :21:
our Str enum CSSValue is export(:CSSValue) «
p6-css/CSS-Grammar-p6
…/AST.pm :53:
our Str enum CSSSelector is export(:CSSSelector) «
p6-css/CSS-Grammar-p6
…/AST.pm :70:
our Str enum CSSUnits is export(:CSSUnits) «
p6-css/CSS-Grammar-p6
…/AST.pm :81:
our Str enum CSSTrait is export(:CSSTrait) «:Box<box>»;
p6-pdf/Font-AFM-p6
…/AFM.pm :375:
:ª("ordfeminine"), "«" => "guillemotleft", "¬" => "logicalnot",
p6-pdf/PDF-API6
…/API6.pm :204:
our Str enum PageLabel «
p6-pdf/PDF-Content-p6
…/encodings.txt :132:
« guillemotleft 253 307 253 253
p6-pdf/PDF-Content-p6
…/Encodings.pm :11:
constant $mac-glyphs = ${" " => "space", "!" => "exclam", "\"" => "quotedbl", "\$" => "dollar", "\%" => "percent", "\&" => "ampersand", "'" => "q…
p6-pdf/PDF-Content-p6
…/Encodings.pm :12:
constant $mac-encoding = ${:A("A"), :AE("®"), :Aacute("ç"), :Acircumflex("å"), :Adieresis("\x[80]"), :Agrave("Ë"), :Aring("\x[81]"), :Atilde("Ì")…
p6-pdf/PDF-Content-p6
…/Encodings.pm :16:
constant $sym-encoding = ${:Alpha("A"), :Beta("B"), :Chi("C"), :Delta("D"), :Epsilon("E"), :Eta("H"), :Euro(" "), :Gamma("G"), :Ifraktur("Á"), :I…
p6-pdf/PDF-Content-p6
…/Encodings.pm :19:
constant $win-glyphs = ${" " => "space", "!" => "exclam", "\"" => "quotedbl", "\$" => "dollar", "\%" => "percent", "\&" => "ampersand", "'" => "q…
p6-pdf/PDF-Content-p6
…/Encodings.pm :20:
constant $win-encoding = ${:A("A"), :AE("Æ"), :Aacute("Á"), :Acircumflex("Â"), :Adieresis("Ä"), :Agrave("À"), :Aring("Å"), :Atilde("Ã"), :B("B"),…
p6-pdf/PDF-Content-p6
…/Encodings.pm :24:
constant $zapf-encoding = ${:a1("!"), :a10("A"), :a100("~"), :a101("¡"), :a102("¢"), :a103("£"), :a104("¤"), :a105("0"), :a106("¥"), :a107("¦"), …
p6-pdf/PDF-Content-p6
…/PNG.pm :15:
enum PNG-CS is export(:PNG-CS) « :Gray(0) :RGB(2) :RGB-Palette(3) :Gray-Alpha(4) :RGB-Alpha(6) »;
p6-pdf/PDF-Content-p6
…/Matrix.pm :14:
my Int enum TransformMatrixElem « :a(0) :b(1) :c(2) :d(3) :e(4) :f(5) »;
p6-pdf/PDF-Content-p6
…/Ops.pm :130:
my Str enum OpCode is export(:OpCode) «
p6-pdf/PDF-Content-p6
…/Ops.pm :172:
my enum ExtGState is export(:ExtGState) «
p6-pdf/PDF-Content-p6
…/Ops.pm :202:
my Int enum TextMode is export(:TextMode) «
p6-pdf/PDF-Content-p6
…/Ops.pm :208:
my Int enum LineCaps is export(:LineCaps) «
p6-pdf/PDF-Content-p6
…/Ops.pm :212:
my Int enum LineJoin is export(:LineJoin) «
p6-pdf/PDF-Content-p6
…/Page.pm :15:
my Array enum PageSizes is export(:PageSizes) «
p6-pdf/PDF-p6
…/Encrypt.pm :53:
my enum PermissionsFlag is export(:PermissionsFlag) « :Print(3) :Modify(4) :Copy(5) :Add(6) :Fill(9)
p6-pdf/PDF-p6
…/io-crypt.t :18:
:O("É\$\"h\x[7f]¬îhn7?\x[10]µÇÐG8\x[5]1R÷âî0á\x[1c]iìD\%v«"),
p6-pdf/PDF-p6
…/io-crypt.t :21:
my $crypt = "åFðë)\x[8a]ø\x[6]}ðFî\x[3]\x[1a]7«Á\x[8b]7\"?^/l\x[a0]Áºqíp\x[13]H\x[3]7êß?ê\x[17]ÒGÉi/¡\x[89]";
p6-pdf/PDF-p6
…/io-crypt.t :59:
:O("É\$\"h\x[7f]¬îhn7?\x[10]µÇÐG8\x[5]1R÷âî0á\x[1c]iìD\%v«"),
p6-pdf/PDF-p6
…/io-crypt.t :62:
my $crypt = "åFðë)\x[8a]ø\x[6]}ðFî\x[3]\x[1a]7«Á\x[8b]7\"?^/l\x[a0]Áºqíp\x[13]H\x[3]7êß?ê\x[17]ÒGÉi/¡\x[89]";
p6-pdf/PDF-p6
…/io-crypt.t :77:
:O("É\$\"h\x[7f]¬îhn7?\x[10]µÇÐG8\x[5]1R÷âî0á\x[1c]iìD\%v«"),
p6-pdf/PDF-p6
…/pdf-crypt-rc4.json :223:
"encoded": "íP:~J1Î>©>\u0018ÆÐ\u0010²\u001d¥ ��¸¹\u0011ùcx�1\n�'��¿B\u001f«ú´\u0004�\"À2k7",
paulohrpinheiro/Brazilian-FederalDocuments
…/PITCHME.md :3:
Camelia »ö<b>«</b>
perl6-community-modules/testml-pm6
…/irc.3 :6:
14:22 <+p6eval> rakudo 1e7012: OUTPUT«a b c␤»
perl6-community-modules/testml-pm6
…/irc.4 :13:
15:31 <+p6eval> rakudo 1e7012: OUTPUT«===SORRY!===␤Missing block at line 11, near ""␤»
perl6-community-modules/testml-pm6
…/irc.4 :19:
15:32 <+p6eval> rakudo 1e7012: OUTPUT«1␤»
perl6-community-modules/testml-pm6
…/irc.4 :22:
15:32 <+p6eval> rakudo 1e7012: OUTPUT«1␤»
perl6-community-modules/testml-pm6
…/irc.6 :11:
10:06 <+p6eval> rakudo bb6df2: OUTPUT«Method 'fields' not found for invocant of class ''â<90>¤ in main program body at line 20:/tmp/SZ6rBy_PBkâ<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :12:
10:06 <+p6eval> rakudo bb6df2: OUTPUT«(Attribute.new(), )â<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :15:
10:07 <+p6eval> rakudo bb6df2: OUTPUT«$!xâ<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :17:
10:07 <+p6eval> rakudo bb6df2: OUTPUT«$!x $!yâ<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :21:
10:07 <+p6eval> rakudo bb6df2: OUTPUT«$!x $!yâ<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :31:
10:14 <+p6eval> rakudo bb6df2: OUTPUT«Attribute()<0x865c930> Attribute()<0x865ce70>â<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :33:
10:15 <+p6eval> rakudo bb6df2: OUTPUT«Parcel()â<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :35:
10:15 <+p6eval> rakudo bb6df2: OUTPUT«$!x $!yâ<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :37:
10:15 <+p6eval> rakudo bb6df2: OUTPUT«0 1â<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :40:
10:15 <+p6eval> rakudo bb6df2: OUTPUT«Attribute()<0x25bb1f0>â<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :42:
10:16 <+p6eval> rakudo bb6df2: OUTPUT«$!yâ<90>¤Â»
perl6-community-modules/testml-pm6
…/irc.6 :47:
16:26 < p6eval> rakudo 94d01f: OUTPUT«foo␤»
perl6-community-modules/testml-pm6
…/irc.6 :50:
16:27 < p6eval> rakudo 94d01f: OUTPUT«P6metaclass()␤»
perl6-community-modules/testml-pm6
…/irc.6 :52:
16:27 < p6eval> rakudo 94d01f: OUTPUT«Method 'methods' not found for invocant of class ''␤ in main program body at line 20:/tmp/7fBlJ522km␤»
perl6-community-modules/testml-pm6
…/irc.6 :58:
16:29 < p6eval> rakudo 94d01f: OUTPUT«$!x␤»
perl6/DBIish
…/Connection.pm6 :197:
my $col-info-sql = qq«
perl6/DBIish
…/CommonTesting.pm6 :25:
%h.sort.flatmap({ join '', .key, '=«', .value, '»' }).join('; ');
perl6/Pod-To-HTML
…/HTML.pm :204:
#
perl6/Pod-To-HTML
…/HTML.pm :211:
#
perl6/Pod-To-HTML
…/HTML.pm :255:
#
perl6/doc
…/CONTRIBUTING.md :85:
MyFunnyRole.do-it(2); # OUTPUT: «example output␤»
perl6/doc
…/CONTRIBUTING.md :98:
1 + 2; # RESULT: «
perl6/doc
…/CONTRIBUTING.md :100:
say 1 + 3; # OUTPUT: «3␤»
perl6/doc
…/STYLEGUIDE.md :42:
say 3.^name; #OUTPUT: «Int␤»
perl6/doc
…/5to6-nutshell.pod6 :54:
=head2 C«->» Method calls
perl6/doc
…/5to6-nutshell.pod6 :385:
say %calories«"$key"»; # Perl 6 - double angles interpolate as a list of Str
perl6/doc
…/5to6-nutshell.pod6 :397:
say join ',', %calories«$keys»; # Perl 6 the split is done after interpolation
perl6/doc
…/5to6-nutshell.pod6 :520:
In Perl 5, the arrow operator, C«->» , is used for single access to a
perl6/doc
…/5to6-nutshell.pod6 :581:
=item C«== != < > <= >=» Numeric comparisons
perl6/doc
…/5to6-nutshell.pod6 :584:
=head2 C«<=> cmp» Three-way comparisons
perl6/doc
…/5to6-nutshell.pod6 :589:
C«cmp» is now named C«leg»; it forces string context for the comparison.
perl6/doc
…/5to6-nutshell.pod6 :591:
C«<=>» still forces numeric context.
perl6/doc
…/5to6-nutshell.pod6 :593:
C«cmp» in Perl 6 does either C«<=>» or C<leg>, depending on the existing
perl6/doc
…/5to6-nutshell.pod6 :626:
=head2 C«<< >>» Numeric shift left
perl6/doc
…/5to6-nutshell.pod6 :628:
Replaced by C«+<» and C«+>» .
perl6/doc
…/5to6-nutshell.pod6 :635:
=head2 C«=>» Fat comma
perl6/doc
…/5to6-nutshell.pod6 :637:
In Perl 5, C«=>» acted just like a comma, but also quoted its left-hand
perl6/doc
…/5to6-nutshell.pod6 :640:
In Perl 6, C«=>» is the Pair operator, which is quite different in
perl6/doc
…/5to6-nutshell.pod6 :643:
If you were using C«=>» in hash initialization, or in passing arguments to
perl6/doc
…/5to6-nutshell.pod6 :651:
If you were using C«=>» as a convenient shortcut to not have to quote part
perl6/doc
…/5to6-nutshell.pod6 :653:
KEY, VALUE, KEY, VALUE, then continuing to use C«=>» may break your code.
perl6/doc
…/5to6-nutshell.pod6 :892:
In Perl 6, that alias is read-only (for safety), unless you change C«->» to
perl6/doc
…/5to6-nutshell.pod6 :893:
C«<->». When translating, inspect the use of the loop variable to decide if
perl6/doc
…/5to6-nutshell.pod6 :903:
then just use C«<->» and explicitly specify C«$_».
perl6/doc
…/5to6-nutshell.pod6 :1051:
require you to add the optional C<m> on a plain match like C«/abc/».
perl6/doc
…/5to6-nutshell.pod6 :1073:
surrounded by C<()>, the assertions will be surrounded by C«<>».
perl6/doc
…/5to6-nutshell.pod6 :1077:
=item C<[abc]> becomes C«<[abc]>»
perl6/doc
…/5to6-nutshell.pod6 :1079:
=item C<[^abc]> becomes C«<-[abc]>»
perl6/doc
…/5to6-nutshell.pod6 :1081:
=item C<[a-zA-Z]> becomes C«<[a..zA..Z]>»
perl6/doc
…/5to6-nutshell.pod6 :1083:
=item C<[[:upper:]]> becomes C«<:Upper>»
perl6/doc
…/5to6-nutshell.pod6 :1085:
=item C<[abc[:upper:]]> becomes C«<[abc]+:Upper>»
perl6/doc
…/5to6-nutshell.pod6 :1089:
=item C<(?=[abc])> becomes C«<?[abc]>»
perl6/doc
…/5to6-nutshell.pod6 :1091:
=item C<(?=ar?bitrary* pattern)> becomes C«<before ar?bitrary* pattern>»
perl6/doc
…/5to6-nutshell.pod6 :1093:
=item C<(?!=[abc])> becomes C«<![abc]>»
perl6/doc
…/5to6-nutshell.pod6 :1095:
=item C<(?!=ar?bitrary* pattern)> becomes C«<!before ar?bitrary* pattern>»
perl6/doc
…/5to6-nutshell.pod6 :1097:
=item C«(?<=ar?bitrary* pattern)» becomes C«<after ar?bitrary* pattern>»
perl6/doc
…/5to6-nutshell.pod6 :1099:
=item C«(?<!ar?bitrary* pattern)» becomes C«<!after ar?bitrary* pattern>»
perl6/doc
…/5to6-nutshell.pod6 :1101:
(Unrelated to <> syntax, the "lookaround" C</foo\Kbar/> becomes C«/foo <( bar )> /»
perl6/doc
…/5to6-nutshell.pod6 :1103:
=item C<(?(?{condition))yes-pattern
perl6/doc
…/5to6-nutshell.pod6 :1177:
So, change the C«=>» to C<=>.
perl6/doc
…/5to6-nutshell.pod6 :1347:
my $captured = run(«echo "$arg"», :out).out.slurp-rest;
perl6/doc
…/5to6-perlfunc.pod6 :196:
by using the dynamic variables L«C<&?ROUTINE>
perl6/doc
…/5to6-perlfunc.pod6 :197:
L«C<&?BLOCK>
perl6/doc
…/5to6-perlfunc.pod6 :198:
L«C<$?FILE>
perl6/doc
…/5to6-perlfunc.pod6 :700:
kill $*PID, 9; # OUTPUT: «Killed␤»
perl6/doc
…/5to6-perlfunc.pod6 :703:
L«C<Proc::Async.kill> method
perl6/doc
…/5to6-perlfunc.pod6 :902:
you can just use the C«prefix:<+>» operator.
perl6/doc
…/5to6-perlfunc.pod6 :928:
No replacement. See L«C<&dir>/C<IO::Path.dir>
perl6/doc
…/5to6-perlfunc.pod6 :985:
Depending on your needs, see L«C<Channel>
perl6/doc
…/5to6-perlfunc.pod6 :987:
for other options), or see L«C<Proc>
perl6/doc
…/5to6-perlfunc.pod6 :1029:
STDOUT, use the L«C<.printf>
perl6/doc
…/5to6-perlop.pod6 :104:
C« << » and C« >> » have been replaced by C<< +< >> and C<< +> >>.
perl6/doc
…/5to6-perlvar.pod6 :140:
# OUTPUT: «(1 2 3 4 5 6)␤»
perl6/doc
…/5to6-perlvar.pod6 :142:
# OUTPUT: «(6 5 4 3 2 1)␤»
perl6/doc
…/5to6-perlvar.pod6 :144:
# OUTPUT: «312␤»
perl6/doc
…/5to6-perlvar.pod6 :436:
(of which L«C<$*ARGFILES>
perl6/doc
…/5to6-perlvar.pod6 :437:
one), you can use L«C<on-switch>
perl6/doc
…/5to6-perlvar.pod6 :439:
See also L«C<IO::CatHandle::AutoLines>
perl6/doc
…/5to6-perlvar.pod6 :440:
and L«C<LN>
perl6/doc
…/classtut.pod6 :33:
say $r.area(); # OUTPUT: «100␤»
perl6/doc
…/classtut.pod6 :117:
say Int.DEFINITE; # OUTPUT: «False␤» (type object)
perl6/doc
…/classtut.pod6 :118:
say 426.DEFINITE; # OUTPUT: «True␤» (instance)
perl6/doc
…/classtut.pod6 :121:
say Foo.DEFINITE; # OUTPUT: «False␤» (type object)
perl6/doc
…/classtut.pod6 :122:
say Foo.new.DEFINITE; # OUTPUT: «True␤» (instance)
perl6/doc
…/classtut.pod6 :128:
say foo Int; # OUTPUT: «It's a type object!␤»
perl6/doc
…/classtut.pod6 :129:
say foo 42; # OUTPUT: «It's an instance!␤»
perl6/doc
…/classtut.pod6 :540:
$cook.cook( 'pizza' ); # OUTPUT: «Cooking pizza␤»
perl6/doc
…/classtut.pod6 :547:
$baker.cook('brioche'); # OUTPUT: «Baking a tasty brioche␤»
perl6/doc
…/concurrency.pod6 :48:
say $p1.status; # OUTPUT: «Planned␤»
perl6/doc
…/concurrency.pod6 :50:
say $p1.status; # OUTPUT: «Kept␤»
perl6/doc
…/concurrency.pod6 :51:
say $p1.result; # OUTPUT: «result␤»
perl6/doc
…/concurrency.pod6 :56:
say $p2.status; # OUTPUT: «Broken␤»
perl6/doc
…/concurrency.pod6 :59:
# OUTPUT: «X::AdHoc+{X::Promise::Broken}: oh no␤»
perl6/doc
…/concurrency.pod6 :70:
say $promise2.result; # OUTPUT: «First Result␤Second Result␤»
perl6/doc
…/concurrency.pod6 :87:
say $promise2.cause; # OUTPUT: «Handled but : ␤First Result␤»
perl6/doc
…/concurrency.pod6 :115:
say $promise.result; # OUTPUT: «55␤»
perl6/doc
…/concurrency.pod6 :157:
say @result; # OUTPUT: «[55 -55]␤»
perl6/doc
…/concurrency.pod6 :223:
# OUTPUT: «X::Promise::Vowed: Access denied to keep/break this Promise; already vowed␤»
perl6/doc
…/concurrency.pod6 :264:
X«
perl6/doc
…/concurrency.pod6 :323:
Here the X<C<whenever>> keyword uses L«C<.act>
perl6/doc
…/concurrency.pod6 :428:
say $channel.receive; # OUTPUT: «Channel One␤»
perl6/doc
…/concurrency.pod6 :765:
say $a; # OUTPUT: «10␤»
perl6/doc
…/containers.pod6 :55:
say $x; # OUTPUT: «23␤»
perl6/doc
…/containers.pod6 :66:
say $x; # OUTPUT: «42␤»
perl6/doc
…/containers.pod6 :87:
say $x.^name; # OUTPUT: «Int␤»
perl6/doc
…/containers.pod6 :88:
say $x.VAR.^name; # OUTPUT: «Scalar␤»
perl6/doc
…/containers.pod6 :96:
# OUTPUT: «X::Parameter::RW: Parameter '$x' expected a writable container, but got Int value␤»
perl6/doc
…/containers.pod6 :134:
# OUTPUT: «X::AdHoc: Cannot assign to an immutable value␤»
perl6/doc
…/containers.pod6 :142:
say $a; # OUTPUT: «42␤»
perl6/doc
…/containers.pod6 :157:
say $a; # OUTPUT: «43␤»
perl6/doc
…/containers.pod6 :161:
say $a; # OUTPUT: «44␤»
perl6/doc
…/containers.pod6 :169:
say (1, 2, 3).^name; # OUTPUT: «List␤»
perl6/doc
…/containers.pod6 :177:
say $x; # OUTPUT: «23␤»
perl6/doc
…/containers.pod6 :180:
# OUTPUT: «X::Assignment::RO: Cannot modify an immutable Int␤»
perl6/doc
…/containers.pod6 :193:
say @a; # OUTPUT: «[42 2 3]␤»
perl6/doc
…/containers.pod6 :206:
my $x = 42; say $x.^name; # OUTPUT: «Int␤»
perl6/doc
…/containers.pod6 :207:
my @a = 42; say @a.^name; # OUTPUT: «Array␤»
perl6/doc
…/containers.pod6 :216:
say @a.^name; # OUTPUT: «List␤»
perl6/doc
…/containers.pod6 :225:
say @a; # OUTPUT: «[42 2 3]␤»
perl6/doc
…/containers.pod6 :249:
# OUTPUT: «X::Bind::Slice: Cannot bind to Array slice␤»
perl6/doc
…/containers.pod6 :268:
say @b.elems; # OUTPUT: «3␤»
perl6/doc
…/containers.pod6 :275:
say (flat @a, 4, 5).elems; # OUTPUT: «5␤»
perl6/doc
…/containers.pod6 :278:
say f @a, 4, 5; # OUTPUT: «5␤»
perl6/doc
…/containers.pod6 :284:
say f $@a, 4, 5; # OUTPUT: «3␤»
perl6/doc
…/containers.pod6 :306:
# OUTPUT: «((my @Array_75093712) = [@Array_75093712,])␤»
perl6/doc
…/containers.pod6 :323:
# OUTPUT: «Type check failed in binding; expected Int but got Str ("forty plus two")␤…»
perl6/doc
…/containers.pod6 :351:
say $a = 12; # OUTPUT: «12␤»
perl6/doc
…/control.pod6 :36:
say 1; # OUTPUT: «1␤»
perl6/doc
…/control.pod6 :37:
{ say 2; say 3 }; # OUTPUT: «2␤3␤»
perl6/doc
…/control.pod6 :38:
say 4; # OUTPUT: «4␤»
perl6/doc
…/control.pod6 :65:
{ 42.say } # OUTPUT: «42␤»
perl6/doc
…/control.pod6 :66:
{ 43.say } # OUTPUT: «43␤»
perl6/doc
…/control.pod6 :67:
{ 42.say }; { 43.say } # OUTPUT: «42␤43␤»
perl6/doc
…/control.pod6 :119:
3, do if 1 { 2 } ; # OUTPUT: «(3, 2)␤»
perl6/doc
…/control.pod6 :120:
3, (if 1 { 2 }) ; # OUTPUT: «(3, 2)␤»
perl6/doc
…/control.pod6 :399:
# OUTPUT: «1 2 3␤4 N/A N/A␤»
perl6/doc
…/control.pod6 :405:
# OUTPUT«I ♥ butterflies!␤I ♥ butterflies!␤I ♥ butterflies!␤»
perl6/doc
…/control.pod6 :416:
to be read-write, use C«<->» instead of C«->». If you need to make C<$_>
perl6/doc
…/control.pod6 :443:
say join ', ', @a; # OUTPUT: «1, 5, 42␤»
perl6/doc
…/control.pod6 :479:
say weird(<a b c>, :direction<backward> ); # OUTPUT: «(c b a)␤»
perl6/doc
…/control.pod6 :533:
# OUTPUT: «42␤43␤Not an Int or a Bar␤44␤Bar␤»
perl6/doc
…/control.pod6 :544:
# OUTPUT: «Int␤»
perl6/doc
…/control.pod6 :558:
# OUTPUT: «42»
perl6/doc
…/control.pod6 :590:
# OUTPUT: «Int␤»
perl6/doc
…/control.pod6 :591:
# OUTPUT: «42␤»
perl6/doc
…/control.pod6 :606:
# OUTPUT: «Int␤»
perl6/doc
…/control.pod6 :607:
# OUTPUT: «42␤»
perl6/doc
…/control.pod6 :626:
# OUTPUT: «Int␤»
perl6/doc
…/control.pod6 :648:
# OUTPUT: «foo␤»
perl6/doc
…/control.pod6 :656:
# OUTPUT: «Sa 03.06.2016»
perl6/doc
…/control.pod6 :679:
(loop ( my $i = 0; $i++ < 3;) { $i * 2 }).say; # OUTPUT: «(2 4 6)␤»
perl6/doc
…/control.pod6 :680:
my @a = (loop ( my $j = 0; $j++ < 3;) { $j * 2 }); @a.say; # OUTPUT: «[2 4 6]␤»
perl6/doc
…/control.pod6 :702:
# OUTPUT: «123␤»
perl6/doc
…/control.pod6 :713:
# OUTPUT: «123␤»
perl6/doc
…/control.pod6 :738:
$x.say; # OUTPUT: «5␤»
perl6/doc
…/control.pod6 :743:
$x.say; # OUTPUT: «6␤»
perl6/doc
…/control.pod6 :748:
$x.say; # OUTPUT: «10␤»
perl6/doc
…/control.pod6 :753:
$x.say; # OUTPUT: «11␤»
perl6/doc
…/control.pod6 :758:
$x.say; # OUTPUT: «15␤»
perl6/doc
…/control.pod6 :763:
$x.say; # OUTPUT: «16␤»
perl6/doc
…/control.pod6 :768:
$x.say; # OUTPUT: «20␤»
perl6/doc
…/control.pod6 :773:
$x.say; # OUTPUT: «21␤»
perl6/doc
…/control.pod6 :805:
# OUTPUT: «X::Multi::NoMatch.new(dispatcher …
perl6/doc
…/control.pod6 :811:
# OUTPUT: «42␤»
perl6/doc
…/control.pod6 :827:
# OUTPUT: «X::AdHoc: WELP!␤»
perl6/doc
…/control.pod6 :839:
} # OUTPUT: «once␤manymanymany»
perl6/doc
…/control.pod6 :855:
# OUTPUT: «still kaput! [...]␤»
perl6/doc
…/exceptions.pod6 :22:
# RESULT: «oops, something went wrong in block <unit> at my-script.p6:1␤»
perl6/doc
…/exceptions.pod6 :35:
# RESULT: «Failed to find 'foo/bar' while trying to do '.zombie copy'
perl6/doc
…/exceptions.pod6 :52:
# RESULT: «some kind of IO exception was caught!»
perl6/doc
…/exceptions.pod6 :88:
# OUTPUT: «something went wrong ...␤»
perl6/doc
…/exceptions.pod6 :102:
say "Hi! I am at the outer block!"; # OUTPUT: «Hi! I am at the outer block!␤»
perl6/doc
…/exceptions.pod6 :154:
# OUTPUT: «99999␤oh no␤»
perl6/doc
…/exceptions.pod6 :165:
# OUTPUT: «not my number!␤»
perl6/doc
…/exceptions.pod6 :171:
# OUTPUT: «sane default␤»
perl6/doc
…/exceptions.pod6 :192:
# OUTPUT: «OHAI␤OBAI␤»
perl6/doc
…/exceptions.pod6 :205:
# RESULT: «foo
perl6/doc
…/exceptions.pod6 :222:
# OUTPUT: «OBAI␤»
perl6/doc
…/exceptions.pod6 :268:
# OUTPUT: «X::ControlFlow::Return: Attempt to return outside of any Routine␤»
perl6/doc
…/faq.pod6 :136:
L«C<App::Mi6> tool
perl6/doc
…/faq.pod6 :137:
process. Latest versions of L«C<zef> module installer
perl6/doc
…/faq.pod6 :213:
the L«non-standard C<dd> routine
perl6/doc
…/faq.pod6 :219:
say $foo.perl; # OUTPUT: «${:foo("bar")}␤»
perl6/doc
…/faq.pod6 :220:
say $foo; # OUTPUT: «{foo => bar}␤»
perl6/doc
…/faq.pod6 :223:
dd $foo; # OUTPUT: «Hash $foo = ${:foo("bar")}␤»
perl6/doc
…/faq.pod6 :260:
such as using L«C<say> routine
perl6/doc
…/faq.pod6 :264:
say $foo; # OUTPUT: «(Any)␤»
perl6/doc
…/faq.pod6 :267:
say $baz; # OUTPUT: «(Int)␤»
perl6/doc
…/faq.pod6 :270:
say $bar; # OUTPUT: «70␤»
perl6/doc
…/faq.pod6 :275:
L«C<with>, C<orwith>, and C<without>
perl6/doc
…/faq.pod6 :276:
L«C<//>
perl6/doc
…/faq.pod6 :288:
say so 1
perl6/doc
…/faq.pod6 :325:
L«-->
perl6/doc
…/faq.pod6 :343:
# OUTPUT: «42␤»
perl6/doc
…/faq.pod6 :402:
say @a; # OUTPUT: «[1 2 3]␤»
perl6/doc
…/faq.pod6 :403:
say @a.^name; # OUTPUT: «Array␤»
perl6/doc
…/faq.pod6 :406:
say $scalar; # OUTPUT: «[1 2 3]␤»
perl6/doc
…/faq.pod6 :407:
say $scalar.^name; # OUTPUT: «Array␤»
perl6/doc
…/faq.pod6 :420:
say @flat.elems; # OUTPUT: «6␤»
perl6/doc
…/faq.pod6 :423:
say @nested.elems; # OUTPUT: «2␤»
perl6/doc
…/faq.pod6 :455:
Perl 6 thinks C<$foo> to be a Hash and C«<html-tag>» to be a string literal
perl6/doc
…/faq.pod6 :540:
say $x; # OUTPUT: «(Date)␤»
perl6/doc
…/faq.pod6 :560:
whitespace in the text of the regex as C«<.ws>» calls (i.e.,
perl6/doc
…/functions.pod6 :72:
say escape 'foo#bar?'; # OUTPUT: «foo\#bar\?␤»
perl6/doc
…/functions.pod6 :80:
say escape 'foo#bar?' # OUTPUT: «foo\x[23]bar\x[3F]␤»
perl6/doc
…/functions.pod6 :84:
say escape 'foo#bar?'; # OUTPUT: «foo\#bar\?␤»
perl6/doc
…/functions.pod6 :89:
say sub ($a, $b) { $a ** 2 + $b ** 2 }(3, 4) # OUTPUT: «25␤»
perl6/doc
…/functions.pod6 :94:
=head2 X«Blocks and Lambdas
perl6/doc
…/functions.pod6 :96:
Whenever you see something like C«{ $_ + 42 }»,
perl6/doc
…/functions.pod6 :97:
C«-> $a, $b { $a ** $b }», or C«{ $^text.indent($:spaces) }», that's
perl6/doc
…/functions.pod6 :103:
# OUTPUT: «12␤34␤»
perl6/doc
…/functions.pod6 :107:
say { $^a ** 2 + $^b ** 2}(3, 4) # OUTPUT: «25␤»
perl6/doc
…/functions.pod6 :131:
dd &s.signature # OUTPUT: «:(*@_, *%_)␤»
perl6/doc
…/functions.pod6 :179:
# OUTPUT: «42␤»
perl6/doc
…/functions.pod6 :187:
# OUTPUT: «(42, "answer")␤»
perl6/doc
…/functions.pod6 :191:
# OUTPUT: «answer 42␤»
perl6/doc
…/functions.pod6 :195:
# OUTPUT: «\("a", "b", "c")␤»
perl6/doc
…/functions.pod6 :202:
sub foo(--> Int) {}; say &foo.returns; # OUTPUT: «(Int)␤»
perl6/doc
…/functions.pod6 :204:
sub foo() returns Int {}; say &foo.returns; # OUTPUT: «(Int)␤»
perl6/doc
…/functions.pod6 :206:
sub foo() of Int {}; say &foo.returns; # OUTPUT: «(Int)␤»
perl6/doc
…/functions.pod6 :208:
my Int sub foo() {}; say &foo.returns; # OUTPUT: «(Int)␤»
perl6/doc
…/functions.pod6 :237:
congratulate 'Larry'; # OUTPUT: «Happy birthday, Larry␤»
perl6/doc
…/functions.pod6 :238:
congratulate 'Bob', 45; # OUTPUT: «Happy 45th birthday, Bob␤»
perl6/doc
…/functions.pod6 :249:
say as-json([True, 42]); # OUTPUT: «[true, 42]␤»
perl6/doc
…/functions.pod6 :276:
$congrats.congratulate('promotion','Cindy'); # OUTPUT: «Hooray for your promotion, Cindy␤»
perl6/doc
…/functions.pod6 :277:
$congrats.congratulate('birthday','Bob'); # OUTPUT: «Happy birthday, Bob␤»
perl6/doc
…/functions.pod6 :307:
say &congratulate.signature # OUTPUT: «(Str $reason, Str $name,
perl6/doc
…/functions.pod6 :329:
mistake-proto(7, 42); # OUTPUT: «Int␤» -- not passed on
perl6/doc
…/functions.pod6 :372:
grab(1, 2); # OUTPUT: «grab 1␤grab 2␤»
perl6/doc
…/functions.pod6 :373:
grab((1, 2)); # OUTPUT: «grab 1␤grab 2␤»
perl6/doc
…/functions.pod6 :374:
grab($(1, 2)); # OUTPUT: «grab 1 2␤»
perl6/doc
…/functions.pod6 :375:
grab((1, 2), 3); # OUTPUT: «grab 1 2␤grab 3␤»
perl6/doc
…/functions.pod6 :381:
grab(flat (1, 2), (3, 4)); # OUTPUT: «grab 1␤grab 2␤grab 3␤grab 4␤»
perl6/doc
…/functions.pod6 :382:
grab(flat $(1, 2), $(3, 4)); # OUTPUT: «grab 1 2␤grab 3 4␤»
perl6/doc
…/functions.pod6 :383:
grab(flat (1, 2)); # OUTPUT: «grab 1␤grab 2␤»
perl6/doc
…/functions.pod6 :384:
grab(flat $(1, 2)); # OUTPUT: «grab 1␤grab 2␤»
perl6/doc
…/functions.pod6 :392:
grab($a); # OUTPUT: «grab 1 2␤»
perl6/doc
…/functions.pod6 :394:
grab($b); # OUTPUT: «grab 1␤grab 2␤»
perl6/doc
…/functions.pod6 :396:
grab(c); # OUTPUT: «grab 1␤grab 2␤»
perl6/doc
…/functions.pod6 :408:
say $square(6); # OUTPUT: «36␤»
perl6/doc
…/functions.pod6 :425:
say join ', ', @squared; # OUTPUT: «1, 4, 9, 16, 25␤»
perl6/doc
…/functions.pod6 :434:
# OUTPUT: «42␤»
perl6/doc
…/functions.pod6 :447:
$generated(); # OUTPUT: «42␤»
perl6/doc
…/functions.pod6 :458:
say join ', ', map { $_ * $multiply-by }, 1..5; # OUTPUT: «5, 10, 15, 20, 25␤»
perl6/doc
…/functions.pod6 :485:
say has-keyword 'not', 'one', 'here'; # OUTPUT: «False␤»
perl6/doc
…/functions.pod6 :486:
say has-keyword 'but', 'here', 'for'; # OUTPUT: «True␤»
perl6/doc
…/functions.pod6 :511:
# OUTPUT: «wrapping testee with arguments :(Int $i, Str $s)»
perl6/doc
…/functions.pod6 :514:
# OUTPUT: «calling testee with \(10, "ten")␤returned from testee with return value "6.151190ten"␤6.151190ten»
perl6/doc
…/functions.pod6 :517:
# OUTPUT: «6.151190ten␤»
perl6/doc
…/functions.pod6 :538:
say 21 + "same"; # OUTPUT: «42␤»
perl6/doc
…/functions.pod6 :542:
say 6!; # OUTPUT: «720␤»
perl6/doc
…/functions.pod6 :552:
say 6!; # OUTPUT: «720␤»
perl6/doc
…/functions.pod6 :563:
say START 'a', 'b', 'c' END; # OUTPUT: «(start [a b c] end)␤»
perl6/doc
…/functions.pod6 :573:
say 42!! 1 !!; # OUTPUT: «42 -> ( 1 )␤»
perl6/doc
…/functions.pod6 :581:
# OUTPUT: «True␤»
perl6/doc
…/functions.pod6 :585:
X«
perl6/doc
…/functions.pod6 :591:
For example, C«infix:<*>» has a tighter precedence than C«infix:<+>»,
perl6/doc
…/functions.pod6 :599:
say 1 + 2 * 3 !! 4; # OUTPUT: «21␤»
perl6/doc
…/functions.pod6 :634:
say 2 ** (2 ** 3); # OUTPUT: «256␤»
perl6/doc
…/functions.pod6 :635:
say (2 ** 2) ** 3; # OUTPUT: «64␤»
perl6/doc
…/functions.pod6 :660:
say 1 § 2 § 3; # OUTPUT: «(1
perl6/doc
…/functions.pod6 :698:
say square 3; # OUTPUT: «18␤»
perl6/doc
…/functions.pod6 :726:
a 1; # OUTPUT: «Int 1␤Any 2␤Back in Int with 5␤»
perl6/doc
…/functions.pod6 :744:
a 1; # OUTPUT: «Int 1␤Any 1␤Back in Int with 5␤»
perl6/doc
…/functions.pod6 :765:
a 1; # OUTPUT: «Int 1␤Any 1␤»
perl6/doc
…/functions.pod6 :784:
say square-root(4); # OUTPUT: «2␤»
perl6/doc
…/functions.pod6 :785:
say square-root(-4); # OUTPUT: «0+2i␤»
perl6/doc
…/functions.pod6 :812:
say power-it(5); # OUTPUT: «625␤»
perl6/doc
…/functions.pod6 :839:
say double '21'; # OUTPUT: «42␤»
perl6/doc
…/functions.pod6 :868:
say $bar.^name; # OUTPUT: «Bar␤»
perl6/doc
…/functions.pod6 :869:
say $bar.msg; # OUTPUT: «I'm a foo! But I am now Bar.␤»
perl6/doc
…/functions.pod6 :879:
X<
perl6/doc
…/functions.pod6 :923:
arguments are specified. However, if C«%*SUB-MAIN-OPTS<named-anywhere>» is
perl6/doc
…/glossary.pod6 :88:
say <42>.^name; # OUTPUT: «IntStr␤»
perl6/doc
…/glossary.pod6 :89:
say <42.1e0>.^name; # OUTPUT: «NumStr␤»
perl6/doc
…/glossary.pod6 :90:
say <42.1>.^name; # OUTPUT: «RatStr␤»
perl6/doc
…/glossary.pod6 :107:
say <42/1>.^name; # OUTPUT: «Rat␤»
perl6/doc
…/glossary.pod6 :108:
say <42+0i>.^name; # OUTPUT: «Complex␤»
perl6/doc
…/glossary.pod6 :109:
say < 42+0i >.^name; # OUTPUT: «ComplexStr␤»
perl6/doc
…/glossary.pod6 :110:
say < 42/1 >.^name; # OUTPUT: «RatStr␤»
perl6/doc
…/glossary.pod6 :130:
say $s.name; # OUTPUT: «triple␤»
perl6/doc
…/glossary.pod6 :132:
say triple(42); # OUTPUT: «Undeclared routine: triple␤»
perl6/doc
…/glossary.pod6 :177:
say f(1
perl6/doc
…/glossary.pod6 :349:
[16:28:28] <+camelia> rakudo-moar 812a48: OUTPUT«Hello world␤»
perl6/doc
…/glossary.pod6 :796:
say @fibonacci[^10]; # OUTPUT: «(1 1 2 3 5 8 13 21 34 55)␤»
perl6/doc
…/glossary.pod6 :801:
say @fibonacci[14]; # OUTPUT: «987␤»
perl6/doc
…/glossary.pod6 :809:
say sum 1 ..9_999_999_999_999; # OUTPUT: «49999999999995000000000000␤»
perl6/doc
…/glossary.pod6 :814:
L«C<gather> and C<take>
perl6/doc
…/glossary.pod6 :849:
L«C<is-lazy>
perl6/doc
…/glossary.pod6 :853:
Another way to fully-reify a list, is by calling L«C<.elems>
perl6/doc
…/glossary.pod6 :859:
For example, the L«C<IO::Handle.lines>
perl6/doc
…/glossary.pod6 :870:
L«C<.lines>
perl6/doc
…/glossary.pod6 :872:
L«C<close>
perl6/doc
…/glossary.pod6 :879:
a C<@>-sigiled variable or call L«C<.elems>
perl6/doc
…/glossary.pod6 :1023:
A value type is created by ensuring that an instance of the value type is immutable (i.e., its attributes cannot be modified after construction) and …
perl6/doc
…/glossary.pod6 :1025:
The language is free to optimize based on the assumption that equivalent instances of value types are interchangeable, but you should not depend on a…
perl6/doc
…/grammar_tutorial.pod6 :157:
# OUTPUT: «「/product/update/7/notify」␤
perl6/doc
…/grammar_tutorial.pod6 :191:
# OUTPUT: «「product」「create」␤»
perl6/doc
…/grammar_tutorial.pod6 :211:
# OUTPUT: «「/ product / update /7 /notify」␤
perl6/doc
…/grammar_tutorial.pod6 :313:
# OUTPUT: «Sub: product Cmd: update Dat: 7/notify␤
perl6/doc
…/grammar_tutorial.pod6 :428:
say $match<data>.made[0]; # OUTPUT: «7␤»
perl6/doc
…/grammar_tutorial.pod6 :429:
say $match<command>.Str; # OUTPUT: «update␤»
perl6/doc
…/grammar_tutorial.pod6 :482:
say $rest<data>[0]; # OUTPUT: «7␤»
perl6/doc
…/grammar_tutorial.pod6 :483:
say $rest<command>; # OUTPUT: «update␤»
perl6/doc
…/grammar_tutorial.pod6 :484:
say $rest<subject>; # OUTPUT: «product␤»
perl6/doc
…/grammar_tutorial.pod6 :495:
say $rest<data>[0]; # OUTPUT: «7␤»
perl6/doc
…/grammar_tutorial.pod6 :496:
say $rest<command>; # OUTPUT: «update␤»
perl6/doc
…/grammar_tutorial.pod6 :497:
say $rest<subject>; # OUTPUT: «product␤»
perl6/doc
…/grammar_tutorial.pod6 :525:
say $rest<command>; # OUTPUT: «update␤»
perl6/doc
…/grammar_tutorial.pod6 :526:
say $rest<subject>; # OUTPUT: «product␤»
perl6/doc
…/grammar_tutorial.pod6 :527:
say $rest<subject-id>; # OUTPUT: «7␤»
perl6/doc
…/grammars.pod6 :40:
say so "32.51" ~~ B<&number>; # OUTPUT: «True␤»
perl6/doc
…/grammars.pod6 :41:
say so "15 + 4.5" ~~ /B<< <number> >>\s* '+' \s*B<< <number> >>/ # OUTPUT: «True␤»
perl6/doc
…/grammars.pod6 :54:
say so $s ~~ &works-but-slow; # OUTPUT: «True␤»
perl6/doc
…/grammars.pod6 :55:
say so $s ~~ &fails-but-fast; # OUTPUT: «False␤», the entire string get taken by the .+
perl6/doc
…/grammars.pod6 :65:
say so 'onceuponatime' ~~ &non-space-y; # OUTPUT: «True␤»
perl6/doc
…/grammars.pod6 :66:
say so 'once upon a time' ~~ &non-space-y; # OUTPUT: «False␤»
perl6/doc
…/grammars.pod6 :67:
say so 'onceuponatime' ~~ &space-y; # OUTPUT: «False␤»
perl6/doc
…/grammars.pod6 :68:
say so 'once upon a time' ~~ &space-y; # OUTPUT: «True␤»
perl6/doc
…/grammars.pod6 :106:
# OUTPUT: «5␤»
perl6/doc
…/grammars.pod6 :129:
# OUTPUT: «5␤»
perl6/doc
…/grammars.pod6 :157:
# OUTPUT: «6␤»
perl6/doc
…/grammars.pod6 :196:
word boundary (C«<
perl6/doc
…/grammars.pod6 :200:
say 'ab c' ~~ /<.ws> ab <.ws> c /; # OUTPUT: «「ab c」␤»
perl6/doc
…/grammars.pod6 :204:
say 'ab' ~~ /. <.ws> b/; # OUTPUT: «Nil␤»
perl6/doc
…/grammars.pod6 :207:
say ')b' ~~ /. <.ws> b/; # OUTPUT: «「)b」␤»
perl6/doc
…/grammars.pod6 :251:
# OUTPUT: «(२५५ ४३५ ७७७)␤»
perl6/doc
…/grammars.pod6 :271:
# OUTPUT: «12717909␤»
perl6/doc
…/grammars.pod6 :274:
# OUTPUT: «12␤»
perl6/doc
…/grammars.pod6 :308:
say $match; # OUTPUT: «「40」␤»
perl6/doc
…/grammars.pod6 :309:
say $match.made; # OUTPUT: «42␤»
perl6/doc
…/io-guide.pod6 :38:
calling L«C<.IO>
perl6/doc
…/io-guide.pod6 :40:
say 'my-file.txt'.IO; # OUTPUT: «"my-file.txt".IO␤»
perl6/doc
…/io-guide.pod6 :44:
see it by using L«C<.perl>
perl6/doc
…/io-guide.pod6 :47:
# OUTPUT: «IO::Path.new("my-file.txt", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))␤»
perl6/doc
…/io-guide.pod6 :56:
L«C<.absolute>
perl6/doc
…/io-guide.pod6 :70:
L«C<spurt>
perl6/doc
…/io-guide.pod6 :94:
could note the L«C<spurt> documentation
perl6/doc
…/io-guide.pod6 :104:
The L«C<.open>
perl6/doc
…/io-guide.pod6 :108:
In the next two lines of code, we use the usual L«C<.print>
perl6/doc
…/io-guide.pod6 :112:
L«C<.open>
perl6/doc
…/io-guide.pod6 :113:
when we attempt to call method L«C<.print>
perl6/doc
…/io-guide.pod6 :116:
L«C<.close>
perl6/doc
…/io-guide.pod6 :120:
you'll reach that limit and the L«C<.open>
perl6/doc
…/io-guide.pod6 :135:
say 'my-file.txt'.IO.slurp; # OUTPUT: «I ♥ Perl!␤»
perl6/doc
…/io-guide.pod6 :136:
say 'my-file.txt'.IO.slurp: :bin; # OUTPUT: «Buf[uint8]:0x<49 20 e2 99 a5 20 50 65 72 6c 21>␤»
perl6/doc
…/io-guide.pod6 :138:
The L«C<.slurp>
perl6/doc
…/io-guide.pod6 :142:
Since L«slurping
perl6/doc
…/io-guide.pod6 :146:
L«C<.words>
perl6/doc
…/io-guide.pod6 :147:
L«C<.lines>
perl6/doc
…/io-guide.pod6 :166:
L«C<.words>
perl6/doc
…/io-guide.pod6 :174:
L«C<.words>
perl6/doc
…/io-guide.pod6 :175:
L«C<.lines>
perl6/doc
…/io-guide.pod6 :186:
say .readchars: 8; # OUTPUT: «I ♥ Perl␤»
perl6/doc
…/io-guide.pod6 :188:
say .readchars: 15; # OUTPUT: «I ♥ Programming␤»
perl6/doc
…/io-guide.pod6 :194:
L«.read
perl6/doc
…/io-guide.pod6 :195:
L«.readchars
perl6/doc
…/io-guide.pod6 :196:
L«.get
perl6/doc
…/io-guide.pod6 :197:
L«.getc
perl6/doc
…/io-guide.pod6 :198:
L«.words
perl6/doc
…/io-guide.pod6 :199:
L«.lines
perl6/doc
…/io-guide.pod6 :200:
L«.slurp
perl6/doc
…/io-guide.pod6 :201:
L«.comb
perl6/doc
…/io-guide.pod6 :202:
L«.split
perl6/doc
…/io-guide.pod6 :203:
and L«.Supply
perl6/doc
…/io-guide.pod6 :211:
L«C<will leave> trait
perl6/doc
…/io-guide.pod6 :213:
L«C<Trait::IO>
perl6/doc
…/io-guide.pod6 :221:
You may have heard of L«C<$*SPEC>
perl6/doc
…/io-guide.pod6 :227:
you almost ever need to use L«C<$*SPEC>
perl6/doc
…/io-guide.pod6 :228:
directly. L«C<$*SPEC>
perl6/doc
…/io-guide.pod6 :232:
The L«C<IO::Path>
perl6/doc
…/io-guide.pod6 :235:
L«C<$*SPEC>
perl6/doc
…/io-guide.pod6 :238:
L«C<IO::Path>
perl6/doc
…/io-guide.pod6 :253:
Don't use the C<.Str> method to stringify L«C<IO::Path>
perl6/doc
…/io-guide.pod6 :256:
L«C<IO::Path>
perl6/doc
…/io-guide.pod6 :257:
value of the L«C<$.CWD> attribute
perl6/doc
…/io-guide.pod6 :266:
The L«C<chdir>
perl6/doc
…/io-guide.pod6 :269:
However, the L«C<IO::Path>
perl6/doc
…/io-guide.pod6 :270:
it's relative to. We just need to use L«C<.absolute>
perl6/doc
…/io-guide.pod6 :271:
L«C<.relative>
perl6/doc
…/io-guide.pod6 :272:
a L«C<Str>
perl6/doc
…/io-guide.pod6 :285:
While usually out of view, every L«C<IO::Path>
perl6/doc
…/io-guide.pod6 :287:
L«C<$*CWD>
perl6/doc
…/io-guide.pod6 :288:
L«C<$.CWD> attribute
perl6/doc
…/io-guide.pod6 :299:
The C<my $*CWD> made L«C<$*CWD>
perl6/doc
…/io-guide.pod6 :300:
undefined. The L«C<.IO>
perl6/doc
…/io-guide.pod6 :301:
then goes ahead and sets the L«C<$.CWD> attribute
perl6/doc
…/io-guide.pod6 :306:
L«C<temp>
perl6/doc
…/io-guide.pod6 :307:
to L«C<$*CWD>
perl6/doc
…/io-guide.pod6 :308:
but it won't make it undefined, so the L«C<.IO>
perl6/doc
…/io-guide.pod6 :315:
L«C<$*CWD>
perl6/doc
…/io-guide.pod6 :316:
L«C<indir> routine
perl6/doc
…/io.pod6 :166:
say "testfile".IO.e; # OUTPUT: «True␤»
perl6/doc
…/io.pod6 :167:
say "lib".IO.e; # OUTPUT: «True␤»
perl6/doc
…/io.pod6 :173:
say "testfile".IO.d; # OUTPUT: «False␤»
perl6/doc
…/io.pod6 :174:
say "lib".IO.d; # OUTPUT: «True␤»
perl6/doc
…/io.pod6 :180:
say "testfile".IO.f; # OUTPUT: «True␤»
perl6/doc
…/io.pod6 :181:
say "lib".IO.f; # OUTPUT: «False␤»
perl6/doc
…/io.pod6 :200:
say dir; # OUTPUT: «"/path/to/testfile".IO "/path/to/lib".IO␤»
perl6/doc
…/io.pod6 :205:
say dir "/etc/"; # OUTPUT: «"/etc/ld.so.conf".IO "/etc/shadow".IO ....␤»
perl6/doc
…/list.pod6 :42:
# OUTPUT: «True␤»
perl6/doc
…/list.pod6 :44:
# OUTPUT: «True␤»
perl6/doc
…/list.pod6 :46:
# OUTPUT: «True␤»
perl6/doc
…/list.pod6 :54:
# OUTPUT: «(foo)()␤»
perl6/doc
…/list.pod6 :56:
# OUTPUT: «foo␤»
perl6/doc
…/list.pod6 :65:
# OUTPUT: «True␤»
perl6/doc
…/list.pod6 :67:
# OUTPUT: «True␤»
perl6/doc
…/list.pod6 :117:
for 1, 2, 3 { .say } # OUTPUT: «1␤2␤3␤»
perl6/doc
…/list.pod6 :125:
say @a.Set<bar buzz>; # OUTPUT: «(True True)␤»
perl6/doc
…/list.pod6 :126:
say so 'bar' ∈ @a; # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :134:
(loop { 42.say })[2] # OUTPUT: «42␤42␤42␤»
perl6/doc
…/list.pod6 :148:
# OUTPUT«Type check failed in binding to $iter; expected Iterator but got List ($("a", "b", "c"))␤ in block <unit> at <tmp> line 1␤␤»
perl6/doc
…/list.pod6 :186:
say (1, (2, 3), 4) eqv (1, 2, 3, 4); # OUTPUT: «False␤»
perl6/doc
…/list.pod6 :187:
say (1, Slip.new(2, 3), 4) eqv (1, 2, 3, 4); # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :188:
say (1, slip(2, 3), 4) eqv (1, 2, 3, 4); # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :194:
say (1,
perl6/doc
…/list.pod6 :195:
say (1,
perl6/doc
…/list.pod6 :196:
say (1, slip($(2, 3)), 4) eqv (1, 2, 3, 4); # OUTPUT: «False␤»
perl6/doc
…/list.pod6 :210:
# OUTPUT: «(1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536)␤»
perl6/doc
…/list.pod6 :229:
$a.say; # OUTPUT: «42␤»
perl6/doc
…/list.pod6 :248:
my @a = (loop { $i.say; last unless --$i }); # OUTPUT: «3␤2␤1␤»
perl6/doc
…/list.pod6 :257:
say (1, (2, (3, 4)), 5).flat eqv (1, 2, 3, 4, 5) # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :265:
for (1, (2, $(3, 4)), 5).flat { .say } # OUTPUT: «1␤2␤(3 4)␤5␤»
perl6/doc
…/list.pod6 :270:
for (1, @l, 5).flat { .say }; # OUTPUT: «1␤2␤3␤4␤5␤»
perl6/doc
…/list.pod6 :272:
for (1, @a, 5).flat { .say }; # OUTPUT: «1␤2␤(3 4)␤5␤»
perl6/doc
…/list.pod6 :323:
(1, 2, 3)[1, 2, :c(3)] # OUTPUT: «Method 'Int' not found for invocant of class 'Pair'␤»
perl6/doc
…/list.pod6 :334:
say ("a", "b", "c")[(1, 2), (0, 1)] eqv (("b", "c"), ("a", "b")) # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :344:
say @a[0..2]; # OUTPUT: «(1 2 3)␤»
perl6/doc
…/list.pod6 :345:
say @a[0..^2]; # OUTPUT: «(1 2)␤»
perl6/doc
…/list.pod6 :346:
say @a[0..*]; # OUTPUT: «(1 2 3 4 5)␤»
perl6/doc
…/list.pod6 :347:
say @a[0..^*]; # OUTPUT: «(1 2 3 4 5)␤»
perl6/doc
…/list.pod6 :348:
say @a[0..Inf-1]; # OUTPUT: «(1 2 3 4 5)␤»
perl6/doc
…/list.pod6 :356:
[ 1, 2, :c(3) ] eqv Array.new((1, 2, :c(3))); # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :357:
[while $++ < 2 { 42.say; 43 }].map: *.say; # OUTPUT: «42␤42␤43␤43␤»
perl6/doc
…/list.pod6 :358:
(while $++ < 2 { 42.say; 43 }).map: *.say; # OUTPUT: «42␤43␤42␤43␤»
perl6/doc
…/list.pod6 :368:
say Array ~~ List # OUTPUT: «True␤»
perl6/doc
…/list.pod6 :455:
@a.of.perl.say; # OUTPUT: «Mu␤»
perl6/doc
…/list.pod6 :456:
@a.default.perl.say; # OUTPUT: «Any␤»
perl6/doc
…/list.pod6 :457:
@a[0].say; # OUTPUT: «(Any)␤»
perl6/doc
…/list.pod6 :459:
@n.of.perl.say; # OUTPUT: «Numeric␤»
perl6/doc
…/list.pod6 :460:
@n.default.perl.say; # OUTPUT: «Real␤»
perl6/doc
…/list.pod6 :461:
@n[0].say; # OUTPUT: «(Real)␤»
perl6/doc
…/list.pod6 :472:
# OUTPUT: «Array.new(:shape(2, 2), [Any, Any], [Any, Any])␤»
perl6/doc
…/list.pod6 :474:
# OUTPUT: «(2 2)␤»
perl6/doc
…/list.pod6 :482:
# OUTPUT: «Array.new(:shape(2, 2), [1, 2], [3, 42])␤»
perl6/doc
…/list.pod6 :511:
((1, 2), $(3, 4)).flat.perl.say; # OUTPUT: «(1, 2, $(3, 4)).Seq␤»
perl6/doc
…/list.pod6 :512:
[(1, 2), $(3, 4)].flat.perl.say; # OUTPUT: «($(1, 2), $(3, 4)).Seq␤»
perl6/doc
…/list.pod6 :518:
(0, [(1, 2), $(3, 4)], 5).flat.perl.say; # OUTPUT: «(0, $(1, 2), $(3, 4), 5).Seq␤»
perl6/doc
…/list.pod6 :526:
say gather [0, [(1, 2), [3, 4]], $(5, 6)].deepmap: *.take; # OUTPUT: «(1 2 3 4 5 6)␤»
perl6/doc
…/list.pod6 :557:
@a.say; # OUTPUT: «[a b c]␤»
perl6/doc
…/list.pod6 :558:
@a.pop.say; # OUTPUT: «c␤»
perl6/doc
…/list.pod6 :559:
@a.say; # OUTPUT: «[a b]␤»
perl6/doc
…/list.pod6 :561:
@a.say; # OUTPUT: «[a b d]␤»
perl6/doc
…/list.pod6 :563:
@a.say; # OUTPUT: «[a c d c]␤»
perl6/doc
…/list.pod6 :575:
@a.say; # OUTPUT: «[42 42 42]␤»
perl6/doc
…/list.pod6 :588:
@a.say; # OUTPUT: «[1 2 "foo"]␤»
perl6/doc
…/list.pod6 :590:
@a.say; # OUTPUT: «[1 2 "bar"]␤»
perl6/doc
…/modules-core.pod6 :10:
=item L«C<CompUnit::Repository::Staging>
perl6/doc
…/modules-core.pod6 :11:
=item L«C<NativeCall>
perl6/doc
…/modules-core.pod6 :12:
=item L«C<NativeCall::Types>
perl6/doc
…/modules-core.pod6 :13:
=item L«C<NativeCall::Compiler::GNU>
perl6/doc
…/modules-core.pod6 :14:
=item L«C<NativeCall::Compiler::MSVC>
perl6/doc
…/modules-core.pod6 :15:
=item L«C<Pod::To::Text>
perl6/doc
…/modules-core.pod6 :16:
=item L«C<Test>
perl6/doc
…/modules-core.pod6 :17:
=item L«C<experimental>
perl6/doc
…/modules-core.pod6 :18:
=item L«C<newline>
perl6/doc
…/modules.pod6 :283:
say sqrt-of-four; # OUTPUT: «2␤»
perl6/doc
…/modules.pod6 :284:
say log-of-zero; # OUTPUT: «-Inf␤»
perl6/doc
…/modules.pod6 :319:
say ShortName.new; # OUTPUT: «MyModule::Class.new␤»
perl6/doc
…/modules.pod6 :374:
say 0?, 1?, {}?, { a => "b" }?; # OUTPUT: «False True False True␤»
perl6/doc
…/modules.pod6 :384:
# OUTPUT: «("DEFAULT", "ALL").Seq»
perl6/doc
…/modules.pod6 :389:
# OUTPUT: «("\&uri-escape", "\&uri_escape", "\&uri-unescape", "\&uri_unescape").Seq»
perl6/doc
…/modules.pod6 :508:
N«
perl6/doc
…/mop.pod6 :101:
.say for (1, 2, 3); # OUTPUT: «1␤2␤3␤», not itemized
perl6/doc
…/mop.pod6 :102:
.say for $(1, 2, 3); # OUTPUT: «(1 2 3)␤», itemized
perl6/doc
…/mop.pod6 :103:
say (1, 2, 3).VAR ~~ Scalar; # OUTPUT: «False␤»
perl6/doc
…/mop.pod6 :104:
say $(1, 2, 3).VAR ~~ Scalar; # OUTPUT: «True␤»
perl6/doc
…/objects.pod6 :27:
# OUTPUT: «ABC␤»
perl6/doc
…/objects.pod6 :48:
# OUTPUT: «Abe--Lincoln--said--Fourscore--and--seven--years--ago␤»
perl6/doc
…/objects.pod6 :54:
say 4.log: ; # OUTPUT: «1.38629436111989␤» ( natural logarithm of 4 )
perl6/doc
…/objects.pod6 :55:
say 4.log: +2; # OUTPUT: «2␤» ( base-2 logarithm of 4 )
perl6/doc
…/objects.pod6 :56:
say 4.log +2; # OUTPUT: «3.38629436111989␤» ( natural logarithm of 4, plus 2 )
perl6/doc
…/objects.pod6 :202:
origin L«=>» 'Sweden',
perl6/doc
…/objects.pod6 :265:
# OUTPUT: «(Any)␤»
perl6/doc
…/objects.pod6 :278:
Foo.new.greet("Bob"); # OUTPUT: «Hi, I am Foo, nice to meet you, Bob␤»
perl6/doc
…/objects.pod6 :300:
say $p.ingredients; # OUTPUT: «[cheese pepperoni vegetables]␤»
perl6/doc
…/objects.pod6 :301:
say $p.get-radius; # OUTPUT: «42␤»
perl6/doc
…/objects.pod6 :304:
# OUTPUT: «Invocant of method 'get-radius' must be an object instance of type 'Pizza',
perl6/doc
…/objects.pod6 :314:
C.f; # OUTPUT: «class method␤»
perl6/doc
…/objects.pod6 :315:
C.new.f; # OUTPUT: «object method␤»
perl6/doc
…/objects.pod6 :339:
C.f; # OUTPUT: «42␤»
perl6/doc
…/objects.pod6 :342:
# OUTPUT: «Invocant of method 'f' must be a type object of type 'C',
perl6/doc
…/objects.pod6 :408:
# OUTPUT: «Initializing Point2D␤»
perl6/doc
…/objects.pod6 :409:
# OUTPUT: «Initializing InvertiblePoint2D␤»
perl6/doc
…/objects.pod6 :410:
# OUTPUT: «InvertiblePoint2D.new(x => 1, y => 2)␤»
perl6/doc
…/objects.pod6 :457:
# OUTPUT: «the child's somewhat more fancy frob is called␤»
perl6/doc
…/objects.pod6 :473:
my $p = PointB<.L<new>>( x L«=>» 5, y => 2);
perl6/doc
…/objects.pod6 :477:
# OUTPUT: «x: 5␤»
perl6/doc
…/objects.pod6 :478:
# OUTPUT: «y: 2␤»
perl6/doc
…/objects.pod6 :485:
# OUTPUT: «x: 5␤»
perl6/doc
…/objects.pod6 :486:
# OUTPUT: «y: 10␤»
perl6/doc
…/objects.pod6 :617:
See L«documentation for C<Mu.clone>
perl6/doc
…/objects.pod6 :647:
say $clone-of-p.x; # OUTPUT: «1␤»
perl6/doc
…/objects.pod6 :686:
$t.steer; # OUTPUT: «Castrates $t␤»
perl6/doc
…/objects.pod6 :789:
X::Ouch.^parents.say # OUTPUT: «((Exception))␤»
perl6/doc
…/objects.pod6 :862:
$t.visit-preorder(&say); # OUTPUT: «5␤4␤6␤»
perl6/doc
…/objects.pod6 :863:
$t.visit-postorder(&say); # OUTPUT: «4␤6␤5␤»
perl6/doc
…/objects.pod6 :879:
Logging[$*OUT].log(debug, 'here we go'); # OUTPUT: «[DEBUG] here we go␤»
perl6/doc
…/objects.pod6 :894:
f($i); # OUTPUT: «hidden!␤»
perl6/doc
…/objects.pod6 :915:
say $toc-counter; # OUTPUT: «NaN␤»
perl6/doc
…/objects.pod6 :918:
put $toc-counter / 1; # OUTPUT: «NaN␤» (because that's numerical context)
perl6/doc
…/objects.pod6 :919:
put $toc-counter; # OUTPUT: «2.2.2␤» (put will call TOC-Counter::Str)
perl6/doc
…/objects.pod6 :924:
say %seen<not-there>; # OUTPUT: «NULL␤»
perl6/doc
…/objects.pod6 :925:
say %seen<not-there>.defined; # OUTPUT: «True␤» (0 may be False but is well defined)
perl6/doc
…/objects.pod6 :926:
say Int.new(%seen<not-there>); # OUTPUT: «0␤»
perl6/doc
…/objects.pod6 :942:
say 1.HOW === 2.HOW; # OUTPUT: «True␤»
perl6/doc
…/objects.pod6 :943:
say 1.HOW === Int.HOW; # OUTPUT: «True␤»
perl6/doc
…/objects.pod6 :944:
say 1.HOW === Num.HOW; # OUTPUT: «False␤»
perl6/doc
…/objects.pod6 :960:
say $metaobject.name($object); # OUTPUT: «Int␤»
perl6/doc
…/objects.pod6 :963:
say 1.HOW.name(1); # OUTPUT: «Int␤»
perl6/doc
…/objects.pod6 :971:
say 1.^name; # OUTPUT: «Int␤»
perl6/doc
…/objects.pod6 :973:
say 1.HOW.name(1); # OUTPUT: «Int␤»
perl6/doc
…/operators.pod6 :22:
L Method postfix .meth .+ .? .* .() .[] .{} .<> .«» .:: .= .^ .:
perl6/doc
…/operators.pod6 :107:
circumfix:«[ ]»(<a b c>); # same as [<a b c>]
perl6/doc
…/operators.pod6 :134:
say $str; # OUTPUT: «new string␤»
perl6/doc
…/operators.pod6 :137:
L«C<Regex>
perl6/doc
…/operators.pod6 :138:
provided replacement string. Sets C<$/> to the L«C<Match>
perl6/doc
…/operators.pod6 :139:
or, if multiple matches were made, a L«C<List>
perl6/doc
…/operators.pod6 :146:
adverbs as the L«C<.subst> method
perl6/doc
…/operators.pod6 :158:
say $str; # OUTPUT: «fox ducked into the den␤»
perl6/doc
…/operators.pod6 :165:
say $str; # OUTPUT: «fox den␤»
perl6/doc
…/operators.pod6 :173:
say S/o .+ d/new/ with 'old string'; # OUTPUT: «new string␤»
perl6/doc
…/operators.pod6 :174:
S:g/« (.)/$0.uc()/.say for <foo bar ber>; # OUTPUT: «Foo␤Bar␤Ber␤»
perl6/doc
…/operators.pod6 :184:
Alternatively, use the L«C<.subst> method
perl6/doc
…/operators.pod6 :207:
$a space-concat= 'word2'; # RESULT: «'word1 word2'»
perl6/doc
…/operators.pod6 :213:
$a .= round; # RESULT: «
perl6/doc
…/operators.pod6 :225:
say so $a != True; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :230:
say so $release !before $today; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :238:
say 4 R/ 12; # OUTPUT: «3␤»
perl6/doc
…/operators.pod6 :239:
say [R/] 2, 4, 16; # OUTPUT: «2␤»
perl6/doc
…/operators.pod6 :241:
=head1 X<<<Hyper Operators
perl6/doc
…/operators.pod6 :243:
Hyper operators apply a given operator enclosed by C<«> and C<»> to one or two
perl6/doc
…/operators.pod6 :244:
lists, returning the resulting list. The pointy part of C<«> or C<»> has to
perl6/doc
…/operators.pod6 :249:
say (1, 2, 3) »*» 2; # OUTPUT: «(2 4 6)␤»
perl6/doc
…/operators.pod6 :250:
say (1, 2, 3, 4) »~» <a b>; # OUTPUT: «(1a 2b 3a 4b)␤»
perl6/doc
…/operators.pod6 :251:
say (1, 2, 3) »+« (4, 5, 6); # OUTPUT: «(5 7 9)␤»
perl6/doc
…/operators.pod6 :256:
say @a »+=» 1; # OUTPUT: «[2 3 4]␤»
perl6/doc
…/operators.pod6 :262:
say !« @wisdom; # OUTPUT: «[False True False]␤»
perl6/doc
…/operators.pod6 :265:
@a»++; # OUTPUT: «(2, 3, 4)␤»
perl6/doc
…/operators.pod6 :269:
say -« [[1, 2], 3]; # OUTPUT: «[[-1 -2] -3]␤»
perl6/doc
…/operators.pod6 :289:
%foo «+» %bar; intersection of keys
perl6/doc
…/operators.pod6 :291:
%foo »+« %bar; union of keys
perl6/doc
…/operators.pod6 :298:
say %outer «~» %inner; # OUTPUT: «{"1" => "ax", "2" => "bz"}␤»
perl6/doc
…/operators.pod6 :309:
for $size «[r/]« (2**60, 2**50, 2**40, 2**30, 2**20, 2**10)
perl6/doc
…/operators.pod6 :323:
# OUTPUT: «10 EB 4 EB 2 PB 5 PB 0.5 PB 4 TB 300 GB 4.5 GB 50 MB 200 MB 9 KB 0.6 MB␤»
perl6/doc
…/operators.pod6 :330:
say (<a b>, <c d e>)».elems; # OUTPUT: «(2 3)␤»
perl6/doc
…/operators.pod6 :331:
say (<a b>, <c d e>)».&{ .elems }; # OUTPUT: «((1 1) (1 1 1))␤»
perl6/doc
…/operators.pod6 :337:
say $neighbors »>>+<<» ($p, *); # OUTPUT: «((1 3) (2 2) (2 4) (3 3))␤»
perl6/doc
…/operators.pod6 :347:
say [+] 1, 2, 3; # OUTPUT: «6␤»
perl6/doc
…/operators.pod6 :348:
say reduce &infix:<+>, 1, 2, 3; # OUTPUT: «6␤»
perl6/doc
…/operators.pod6 :354:
say [[&plus]] 1, 2, 3; # OUTPUT: «6␤»
perl6/doc
…/operators.pod6 :359:
say [X~] (1, 2), <a b>; # OUTPUT: «1, 2 X~ <a b>␤»
perl6/doc
…/operators.pod6 :368:
say @n[^5]; # OUTPUT: «(1 12 123 1234 12345)␤»
perl6/doc
…/operators.pod6 :377:
1..3 X~ <a b> # RESULT: «<1a, 1b, 2a, 2b, 3a, 3b>␤»
perl6/doc
…/operators.pod6 :386:
my @l = <a b c> Z~ 1, 2, 3; # RESULT: «[a1 b2 c3]␤»
perl6/doc
…/operators.pod6 :392:
my @l = <a b c d> Z~ ':' xx *; # RESULT: «<a: b: c: d:>»
perl6/doc
…/operators.pod6 :393:
@l = <a b c d> Z~ 1, 2, *; # RESULT: «<a1 b2 c2 d2>»
perl6/doc
…/operators.pod6 :397:
my @l = 1 Z 2; # RESULT: «[(1 2)]»
perl6/doc
…/operators.pod6 :405:
say so 1 S& 2 S& 3; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :415:
say @a; # OUTPUT: «[19 20 21]␤»
perl6/doc
…/operators.pod6 :419:
=head2 term C«< >»
perl6/doc
…/operators.pod6 :426:
say <a b c>[1]; # OUTPUT: «b␤»
perl6/doc
…/operators.pod6 :428:
=head2 term C«( )»
perl6/doc
…/operators.pod6 :441:
p a => 1; # OUTPUT: «named␤»
perl6/doc
…/operators.pod6 :442:
p (a => 1); # OUTPUT: «positional␤»
perl6/doc
…/operators.pod6 :444:
=head2 term C«{ }»
perl6/doc
…/operators.pod6 :458:
=head2 circumfix C«[ ]»
perl6/doc
…/operators.pod6 :465:
=head2 postcircumfix C«[ ]»
perl6/doc
…/operators.pod6 :476:
say @alphabet[0]; # OUTPUT: «a␤»
perl6/doc
…/operators.pod6 :477:
say @alphabet[1]; # OUTPUT: «b␤»
perl6/doc
…/operators.pod6 :478:
say @alphabet[*-1]; # OUTPUT: «z␤»
perl6/doc
…/operators.pod6 :479:
say @alphabet[100]:exists; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :480:
say @alphabet[15, 4, 17, 11].join; # OUTPUT: «perl␤»
perl6/doc
…/operators.pod6 :481:
say @alphabet[23 .. *].perl; # OUTPUT: «("x", "y", "z")␤»
perl6/doc
…/operators.pod6 :484:
say @alphabet[0..3].perl # OUTPUT: «("a", "B", "C", "d")␤»
perl6/doc
…/operators.pod6 :489:
=head2 postcircumfix C«{ }»
perl6/doc
…/operators.pod6 :500:
say %color{"banana"}; # OUTPUT: «yellow␤»
perl6/doc
…/operators.pod6 :501:
say %color{"cherry", "kiwi"}.perl; # OUTPUT: «("red", "green")␤»
perl6/doc
…/operators.pod6 :502:
say %color{"strawberry"}:exists; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :506:
say %color; # OUTPUT: «banana => yellowish, kiwi => green, lime => green␤»
perl6/doc
…/operators.pod6 :508:
See L«C«postcircumfix < >»
perl6/doc
…/operators.pod6 :509:
L<C<postcircumfix « »>
perl6/doc
…/operators.pod6 :514:
=head2 postcircumfix C«< >»
perl6/doc
…/operators.pod6 :517:
its argument using the same rules as the L«quote-words operator
perl6/doc
…/operators.pod6 :521:
say %color<banana>; # OUTPUT: «yellow␤»
perl6/doc
…/operators.pod6 :522:
say %color<cherry kiwi>.perl; # OUTPUT: «("red", "green")␤»
perl6/doc
…/operators.pod6 :523:
say %color<strawberry>:exists; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :528:
=head2 postcircumfix C<« »>
perl6/doc
…/operators.pod6 :532:
/routine/« »#circumfix_«_»> of the same name.
perl6/doc
…/operators.pod6 :536:
say %color«cherry "$fruit"».perl; # OUTPUT: «("red", "green")␤»
perl6/doc
…/operators.pod6 :541:
=head2 postcircumfix C«( )»
perl6/doc
…/operators.pod6 :552:
=head2 postfix C«
perl6/doc
…/operators.pod6 :558:
X«
perl6/doc
…/operators.pod6 :559:
=head2 postfix C«.&»
perl6/doc
…/operators.pod6 :569:
# OUTPUT: «Int $invocant = 42␤»
perl6/doc
…/operators.pod6 :571:
# OUTPUT: «Int $invocant = 42␤»
perl6/doc
…/operators.pod6 :573:
=head2 postfix C«.=»
perl6/doc
…/operators.pod6 :580:
X«
perl6/doc
…/operators.pod6 :581:
=head2 postfix C«.^»
perl6/doc
…/operators.pod6 :589:
X«
perl6/doc
…/operators.pod6 :590:
=head2 postfix C«.?»
perl6/doc
…/operators.pod6 :597:
X«
perl6/doc
…/operators.pod6 :598:
=head2 postfix C«.+»
perl6/doc
…/operators.pod6 :605:
X«
perl6/doc
…/operators.pod6 :606:
=head2 postfix C«.*»
perl6/doc
…/operators.pod6 :614:
X<
perl6/doc
…/operators.pod6 :615:
=head2 postfix C<».> / postfix C«>>.»
perl6/doc
…/operators.pod6 :620:
my @b = @a».ord; # OUTPUT: «[97, 98, 99]␤»
perl6/doc
…/operators.pod6 :654:
say $addition.function()(1, 2); # OUTPUT: «3␤»
perl6/doc
…/operators.pod6 :656:
say $addition.function.(1, 2); # OUTPUT: «3␤»
perl6/doc
…/operators.pod6 :668:
=head2 postfix C«.:<prefix>»
perl6/doc
…/operators.pod6 :673:
say ++$a; # OUTPUT: «2␤»
perl6/doc
…/operators.pod6 :674:
say $a.:<++>; # OUTPUT: «3␤»
perl6/doc
…/operators.pod6 :679:
=head2 postfix C«.::»
perl6/doc
…/operators.pod6 :690:
say Foo.Bar::baz; # OUTPUT: «42␤»
perl6/doc
…/operators.pod6 :694:
=head2 prefix X<C«++»
perl6/doc
…/operators.pod6 :701:
say ++$x; # OUTPUT: «4␤»
perl6/doc
…/operators.pod6 :702:
say $x; # OUTPUT: «4␤»
perl6/doc
…/operators.pod6 :708:
=head2 prefix X<C«--»
perl6/doc
…/operators.pod6 :715:
say --$x; # OUTPUT: «2␤»
perl6/doc
…/operators.pod6 :716:
say $x; # OUTPUT: «2␤»
perl6/doc
…/operators.pod6 :723:
=head2 postfix X<C«++»
perl6/doc
…/operators.pod6 :730:
say $x++; # OUTPUT: «3␤»
perl6/doc
…/operators.pod6 :731:
say $x; # OUTPUT: «4␤»
perl6/doc
…/operators.pod6 :741:
say $x++; # OUTPUT: «0␤»
perl6/doc
…/operators.pod6 :742:
say $x; # OUTPUT: «1␤»
perl6/doc
…/operators.pod6 :749:
# OUTPUT: «somefile-001.txt␤somefile-002.txt␤somefile-003.txt␤»
perl6/doc
…/operators.pod6 :751:
=head2 postfix C«--»
perl6/doc
…/operators.pod6 :758:
say $x--; # OUTPUT: «3␤»
perl6/doc
…/operators.pod6 :759:
say $x; # OUTPUT: «2␤»
perl6/doc
…/operators.pod6 :769:
say $x--; # OUTPUT: «0␤»
perl6/doc
…/operators.pod6 :770:
say $x; # OUTPUT: «-1␤»
perl6/doc
…/operators.pod6 :778:
# OUTPUT: «somefile-003.txt␤somefile-002.txt␤somefile-001.txt␤»
perl6/doc
…/operators.pod6 :782:
=head2 infix C«**»
perl6/doc
…/operators.pod6 :795:
=head2 prefix C«
perl6/doc
…/operators.pod6 :804:
=head2 prefix C«
perl6/doc
…/operators.pod6 :814:
=head2 prefix C«
perl6/doc
…/operators.pod6 :822:
=head2 prefix C«
perl6/doc
…/operators.pod6 :831:
=head2 prefix C«
perl6/doc
…/operators.pod6 :839:
=head2 prefix C«
perl6/doc
…/operators.pod6 :848:
=head2 prefix C«
perl6/doc
…/operators.pod6 :852:
=head2 prefix C«+^»
perl6/doc
…/operators.pod6 :861:
=head2 prefix C«~^»
perl6/doc
…/operators.pod6 :868:
=head2 prefix C«?^»
perl6/doc
…/operators.pod6 :877:
=head2 prefix C«
perl6/doc
…/operators.pod6 :886:
say ^5; # OUTPUT: «0..^5␤»
perl6/doc
…/operators.pod6 :894:
=head2 infix C«.=»
perl6/doc
…/operators.pod6 :905:
# OUTPUT: «6␤»
perl6/doc
…/operators.pod6 :907:
# OUTPUT: «Cannot modify an immutable Int␤
perl6/doc
…/operators.pod6 :910:
=head2 infix C«
perl6/doc
…/operators.pod6 :919:
# OUTPUT: «-5␤»
perl6/doc
…/operators.pod6 :921:
# OUTPUT: «5␤»
perl6/doc
…/operators.pod6 :923:
# OUTPUT: «5␤»
perl6/doc
…/operators.pod6 :927:
=head2 infix C«
perl6/doc
…/operators.pod6 :936:
=head2 infix C«
perl6/doc
…/operators.pod6 :946:
=head2 infix C«div»
perl6/doc
…/operators.pod6 :952:
=head2 infix C«
perl6/doc
…/operators.pod6 :963:
=head2 infix C«%%»
perl6/doc
…/operators.pod6 :969:
=head2 infix C«mod»
perl6/doc
…/operators.pod6 :975:
=head2 infix C«+&»
perl6/doc
…/operators.pod6 :982:
=head2 infix C«+<»
perl6/doc
…/operators.pod6 :988:
=head2 infix C«+>»
perl6/doc
…/operators.pod6 :994:
=head2 infix C«~&»
perl6/doc
…/operators.pod6 :1000:
=head2 infix C«~<»
perl6/doc
…/operators.pod6 :1007:
=head2 infix C«~>»
perl6/doc
…/operators.pod6 :1014:
=head2 infix C«gcd»
perl6/doc
…/operators.pod6 :1020:
=head2 infix C«lcm»
perl6/doc
…/operators.pod6 :1029:
=head2 infix C«
perl6/doc
…/operators.pod6 :1037:
=head2 infix C«
perl6/doc
…/operators.pod6 :1046:
=head2 infix C«+
perl6/doc
…/operators.pod6 :1055:
=head2 infix C«+^»
perl6/doc
…/operators.pod6 :1064:
=head2 infix C«~
perl6/doc
…/operators.pod6 :1070:
=head2 infix C«~^»
perl6/doc
…/operators.pod6 :1076:
=head2 infix C«?
perl6/doc
…/operators.pod6 :1087:
=head2 infix C«
perl6/doc
…/operators.pod6 :1093:
Repeats the string C<$a> C<$b> times, if necessary coercing C<$a> to L«C<Str>
perl6/doc
…/operators.pod6 :1094:
and C<$b> L«C<Int>
perl6/doc
…/operators.pod6 :1096:
say 'ab' x 3; # OUTPUT: «ababab␤»
perl6/doc
…/operators.pod6 :1097:
say 42 x 3; # OUTPUT: «424242␤»
perl6/doc
…/operators.pod6 :1101:
say $a x $b; # OUTPUT: «aaa␤»
perl6/doc
…/operators.pod6 :1103:
=head2 infix C«xx»
perl6/doc
…/operators.pod6 :1115:
# OUTPUT: «([1 2] [1 2] [1 2] [1 2] [1 2])␤»
perl6/doc
…/operators.pod6 :1128:
=head2 infix C«
perl6/doc
…/operators.pod6 :1138:
say 'ab' ~ 'c'; # OUTPUT: «abc␤»
perl6/doc
…/operators.pod6 :1142:
=head2 infix C«
perl6/doc
…/operators.pod6 :1153:
=head2 infix C«
perl6/doc
…/operators.pod6 :1162:
=head2 infix C«
perl6/doc
…/operators.pod6 :1173:
=head2 prefix C«temp»
perl6/doc
…/operators.pod6 :1183:
say $a; # OUTPUT: «three␤»
perl6/doc
…/operators.pod6 :1186:
say $a; # OUTPUT: «three␤»
perl6/doc
…/operators.pod6 :1188:
say $a; # OUTPUT: «four␤»
perl6/doc
…/operators.pod6 :1190:
say $a; # OUTPUT: «three␤»
perl6/doc
…/operators.pod6 :1198:
=head2 prefix C«let»
perl6/doc
…/operators.pod6 :1227:
=head2 infix C«does»
perl6/doc
…/operators.pod6 :1239:
=head2 infix C«but»
perl6/doc
…/operators.pod6 :1252:
say 42 but 'forty two'; # OUTPUT: «forty two␤»
perl6/doc
…/operators.pod6 :1255:
say $s.Warbles.hi; # OUTPUT: «hello␤»
perl6/doc
…/operators.pod6 :1256:
say $s + 42; # OUTPUT: «54␤»
perl6/doc
…/operators.pod6 :1263:
=head2 infix C«cmp»
perl6/doc
…/operators.pod6 :1277:
say (a => 3) cmp (a => 4); # OUTPUT: «Less␤»
perl6/doc
…/operators.pod6 :1278:
say 4 cmp 4.0; # OUTPUT: «Same␤»
perl6/doc
…/operators.pod6 :1279:
say 'b' cmp 'a'; # OUTPUT: «More␤»
perl6/doc
…/operators.pod6 :1281:
=head2 infix C«leg»
perl6/doc
…/operators.pod6 :1290:
say 'a' leg 'b'; # OUTPUT: «Less␤»
perl6/doc
…/operators.pod6 :1291:
say 'a' leg 'a'; # OUTPUT: «Same␤»
perl6/doc
…/operators.pod6 :1292:
say 'b' leg 'a'; # OUTPUT: «More␤»
perl6/doc
…/operators.pod6 :1294:
=head2 infix C«<=>»
perl6/doc
…/operators.pod6 :1296:
multi sub infix:«<=>»($a, $b --> Order:D) is assoc<non>
perl6/doc
…/operators.pod6 :1302:
=head2 infix C«..»
perl6/doc
…/operators.pod6 :1310:
=head2 infix C«..^»
perl6/doc
…/operators.pod6 :1318:
=head2 infix C«^..»
perl6/doc
…/operators.pod6 :1326:
=head2 infix C«^..^»
perl6/doc
…/operators.pod6 :1336:
=head2 infix C«==»
perl6/doc
…/operators.pod6 :1351:
=head2 infix C«!=»
perl6/doc
…/operators.pod6 :1360:
Is an alias to C«!==».
perl6/doc
…/operators.pod6 :1362:
=head2 infix C«≠»
perl6/doc
…/operators.pod6 :1366:
Equivalent to L«!=», at codepoint U+2260 (NOT EQUAL TO).
perl6/doc
…/operators.pod6 :1368:
=head2 infix C«
perl6/doc
…/operators.pod6 :1370:
multi sub infix:«<»(Int:D, Int:D)
perl6/doc
…/operators.pod6 :1371:
multi sub infix:«<»(Num:D, Num:D)
perl6/doc
…/operators.pod6 :1372:
multi sub infix:«<»(Real:D, Real:D)
perl6/doc
…/operators.pod6 :1379:
=head2 infix C«<=»
perl6/doc
…/operators.pod6 :1381:
multi sub infix:«<=»(Int:D, Int:D)
perl6/doc
…/operators.pod6 :1382:
multi sub infix:«<=»(Num:D, Num:D)
perl6/doc
…/operators.pod6 :1383:
multi sub infix:«<=»(Real:D, Real:D)
perl6/doc
…/operators.pod6 :1390:
=head2 infix C«≤»
perl6/doc
…/operators.pod6 :1394:
Equivalent to L«<=», at codepoint U+2264 (LESS-THAN OR EQUAL TO).
perl6/doc
…/operators.pod6 :1396:
=head2 infix C«
perl6/doc
…/operators.pod6 :1398:
multi sub infix:«>»(Int:D, Int:D)
perl6/doc
…/operators.pod6 :1399:
multi sub infix:«>»(Num:D, Num:D)
perl6/doc
…/operators.pod6 :1400:
multi sub infix:«>»(Real:D, Real:D)
perl6/doc
…/operators.pod6 :1407:
=head2 infix C«>=»
perl6/doc
…/operators.pod6 :1409:
multi sub infix:«>=»(Int:D, Int:D)
perl6/doc
…/operators.pod6 :1410:
multi sub infix:«>=»(Num:D, Num:D)
perl6/doc
…/operators.pod6 :1411:
multi sub infix:«>=»(Real:D, Real:D)
perl6/doc
…/operators.pod6 :1418:
=head2 infix C«≥»
perl6/doc
…/operators.pod6 :1422:
Equivalent to L«>=», at codepoint U+2265 (GREATER-THAN OR EQUAL TO).
perl6/doc
…/operators.pod6 :1424:
=head2 infix C«eq»
perl6/doc
…/operators.pod6 :1436:
=head2 infix C«ne»
perl6/doc
…/operators.pod6 :1448:
=head2 infix C«gt»
perl6/doc
…/operators.pod6 :1461:
=head2 infix C«ge»
perl6/doc
…/operators.pod6 :1474:
=head2 infix C«lt»
perl6/doc
…/operators.pod6 :1487:
=head2 infix C«le»
perl6/doc
…/operators.pod6 :1500:
=head2 infix C«before»
perl6/doc
…/operators.pod6 :1510:
=head2 infix C«after»
perl6/doc
…/operators.pod6 :1520:
=head2 infix C«eqv»
perl6/doc
…/operators.pod6 :1527:
say [1, 2, 3] eqv [1, 2, 3]; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1528:
say Any eqv Any; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1529:
say 1 eqv 2; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1530:
say 1 eqv 1.0; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1532:
Lazy L«C<Iterables>
perl6/doc
…/operators.pod6 :1537:
say (1…∞) eqv (1…∞).List; # Both lazy, but different types; OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1538:
say (1…∞) eqv (1…3); # Same types, but only one is lazy; OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1540:
orelse say $!.^name; # OUTPUT: «X::Cannot::Lazy␤»
perl6/doc
…/operators.pod6 :1549:
say A.new(a => 5) eqv A.new(a => 5); # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1559:
say A.new(a => 5) eqv A.new(a => 5); # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1561:
=head2 infix C«===»
perl6/doc
…/operators.pod6 :1569:
say $a === $a; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1570:
say A.new === A.new; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1571:
say A === A; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1575:
say 'a' === 'a'; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1576:
say 'a' === 'b'; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1579:
say 1 === 1.0; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1584:
=head2 infix C«=:=»
perl6/doc
…/operators.pod6 :1593:
say $a =:= $b; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1595:
say $a; # OUTPUT: «1␤»
perl6/doc
…/operators.pod6 :1597:
say $a =:= $b; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1599:
say $b; # OUTPUT: «5␤»
perl6/doc
…/operators.pod6 :1601:
=head2 infix C«~~»
perl6/doc
…/operators.pod6 :1640:
say ($x + $*TOLERANCE) =~= $x; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1641:
say ($x - $*TOLERANCE) =~= $x; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1656:
say 11 =~= 10; # OUTPUT: «True␤»
perl6/doc
…/operators.pod6 :1663:
say 1 =~= 1; # OUTPUT: «False␤»
perl6/doc
…/operators.pod6 :1668:
=head2 infix C«&&»
perl6/doc
…/operators.pod6 :1679:
say a() && b() && c(); # OUTPUT: «0␤»
perl6/doc
…/operators.pod6 :1683:
=head2 infix C«
perl6/doc
…/operators.pod6 :1694:
say a()
perl6/doc
…/operators.pod6 :1696:
=head2 infix C«^^»
perl6/doc
…/operators.pod6 :1705:
say 0 ^^ 42; # OUTPUT: «42␤»
perl6/doc
…/operators.pod6 :1706:
say '' ^^ 0; # OUTPUT: «0␤»
perl6/doc
…/operators.pod6 :1707:
say 0 ^^ 42 ^^ 1 ^^ die "never called"; # OUTPUT: «␤»
perl6/doc
…/operators.pod6 :1709:
Note that the semantics of this operator may not be what you assume: infix C«^^»
perl6/doc
…/operators.pod6 :1714:
=head2 infix C«//»
perl6/doc
…/operators.pod6 :1719:
say Any // 0 // 42; # OUTPUT: «0␤»
perl6/doc
…/operators.pod6 :1721:
=head2 infix C«min»
perl6/doc
…/operators.pod6 :1728:
=head2 infix C«max»
perl6/doc
…/operators.pod6 :1745:
=head2 infix C«ff»
perl6/doc
…/operators.pod6 :1783:
say $_ if /A/ ff /B/; # OUTPUT: «AB␤»
perl6/doc
…/operators.pod6 :1790:
say $_ if /C/ ff *; # OUTPUT: «C␤D␤E␤»
perl6/doc
…/operators.pod6 :1798:
=head2 infix C«^ff»
perl6/doc
…/operators.pod6 :1808:
say $_ if /A/ ff /C/ for @list; # OUTPUT: «A␤B␤C␤»
perl6/doc
…/operators.pod6 :1809:
say $_ if /A/ ^ff /C/ for @list; # OUTPUT: «B␤C␤»
perl6/doc
…/operators.pod6 :1815:
=head2 infix C«ff^»
perl6/doc
…/operators.pod6 :1823:
say $_ if /A/ ff /C/ for @list; # OUTPUT: «A␤B␤C␤»
perl6/doc
…/operators.pod6 :1824:
say $_ if /A/ ff^ /C/ for @list; # OUTPUT: «A␤B␤»
perl6/doc
…/operators.pod6 :1830:
=head2 infix C«^ff^»
perl6/doc
…/operators.pod6 :1838:
say $_ if /A/ ff /C/ for @list; # OUTPUT: «A␤B␤C␤»
perl6/doc
…/operators.pod6 :1839:
say $_ if /A/ ^ff^ /C/ for @list; # OUTPUT: «B␤»
perl6/doc
…/operators.pod6 :1845:
=head2 infix C«fff»
perl6/doc
…/operators.pod6 :1858:
say $_ if /A/ fff /B/; # OUTPUT: «AB␤C␤D␤B␤»
perl6/doc
…/operators.pod6 :1867:
=head2 infix C«^fff»
perl6/doc
…/operators.pod6 :1874:
say $_ if /A/ fff /C/ for @list; # OUTPUT: «A␤B␤C␤»
perl6/doc
…/operators.pod6 :1875:
say $_ if /A/ ^fff /C/ for @list; # OUTPUT: «B␤C␤»
perl6/doc
…/operators.pod6 :1881:
=head2 infix C«fff^»
perl6/doc
…/operators.pod6 :1888:
say $_ if /A/ fff /C/ for @list; # OUTPUT: «A␤B␤C␤»
perl6/doc
…/operators.pod6 :1889:
say $_ if /A/ fff^ /C/ for @list; # OUTPUT: «A␤B␤»
perl6/doc
…/operators.pod6 :1895:
=head2 infix C«^fff^»
perl6/doc
…/operators.pod6 :1903:
say $_ if /A/ fff /C/ for @list; # OUTPUT: «A␤B␤C␤»
perl6/doc
…/operators.pod6 :1904:
say $_ if /A/ ^fff^ /C/ for @list; # OUTPUT: «B␤»
perl6/doc
…/operators.pod6 :1912:
=head2 infix C«
perl6/doc
…/operators.pod6 :1927:
=head2 infix C«=>»
perl6/doc
…/operators.pod6 :1929:
sub infix:«=>»($key, Mu $value --> Pair:D)
perl6/doc
…/operators.pod6 :1940:
say $p.key; # OUTPUT: «a␤»
perl6/doc
…/operators.pod6 :1941:
say $p.value; # OUTPUT: «1␤»
perl6/doc
…/operators.pod6 :1951:
=head2 prefix C«not»
perl6/doc
…/operators.pod6 :1960:
=head2 prefix C«so»
perl6/doc
…/operators.pod6 :1969:
=head2 infix C«
perl6/doc
…/operators.pod6 :1976:
=head2 infix C«
perl6/doc
…/operators.pod6 :1989:
=head2 infix C«
perl6/doc
…/operators.pod6 :1999:
say (1, 2 Z <a b c> Z <+ ->).perl; # OUTPUT: «((1, "a", "+"), (2, "b", "-")).Seq␤»
perl6/doc
…/operators.pod6 :2003:
# OUTPUT: «a:1␤b:2␤c:3␤»
perl6/doc
…/operators.pod6 :2009:
say 100, 200 Z+ 42, 23; # OUTPUT: «(142 223)␤»
perl6/doc
…/operators.pod6 :2010:
say 1..3 Z~ <a b c> Z~ 'x' xx 3; # OUTPUT: «(1ax 2bx 3cx)␤»
perl6/doc
…/operators.pod6 :2012:
=head2 infix C«
perl6/doc
…/operators.pod6 :2031:
=head2 infix C«...»
perl6/doc
…/operators.pod6 :2049:
say 1 ... 4; # OUTPUT: «(1 2 3 4)␤»
perl6/doc
…/operators.pod6 :2050:
say 4 ... 1; # OUTPUT: «(4 3 2 1)␤»
perl6/doc
…/operators.pod6 :2051:
say 'a' ... 'e'; # OUTPUT: «(a b c d e)␤»
perl6/doc
…/operators.pod6 :2052:
say 'e' ... 'a'; # OUTPUT: «(e d c b a)␤»
perl6/doc
…/operators.pod6 :2057:
say (1 ... *)[^5]; # OUTPUT: «(1 2 3 4 5)␤»
perl6/doc
…/operators.pod6 :2063:
say (1, 1, -> $a, $b { $a + $b } ... *)[^8]; # OUTPUT: «(1 1 2 3 5 8 13 21)␤»
perl6/doc
…/operators.pod6 :2065:
say (1, 1, *+* ... *)[^8]; # OUTPUT: «(1 1 2 3 5 8 13 21)␤»
perl6/doc
…/operators.pod6 :2069:
say 5, { $_ * 2 } ... 40; # OUTPUT: «5 10 20 40␤»
perl6/doc
…/operators.pod6 :2077:
say 2, 4, 6 ... 12; # OUTPUT: «(2 4 6 8 10 12)␤»
perl6/doc
…/operators.pod6 :2078:
say 1, 2, 4 ... 32; # OUTPUT: «(1 2 4 8 16 32)␤»
perl6/doc
…/operators.pod6 :2096:
# OUTPUT: «(1 2 4)␤»
perl6/doc
…/operators.pod6 :2100:
=head2 infix C«
perl6/doc
…/operators.pod6 :2108:
=head2 infix C«:=»
perl6/doc
…/operators.pod6 :2133:
=head2 infix C«::=»
perl6/doc
…/operators.pod6 :2137:
=head2 listop C«...»
perl6/doc
…/operators.pod6 :2148:
=head2 listop C«!!!»
perl6/doc
…/operators.pod6 :2160:
=head2 listop C«???»
perl6/doc
…/operators.pod6 :2189:
=head2 infix C«and»
perl6/doc
…/operators.pod6 :2197:
=head2 infix C«andthen»
perl6/doc
…/operators.pod6 :2199:
Returns L«C<Empty>
perl6/doc
…/operators.pod6 :2205:
L«C<Callable>
perl6/doc
…/operators.pod6 :2219:
# OUTPUT: «(good data is good)␤»
perl6/doc
…/operators.pod6 :2230:
L«C<with> statement modifier
perl6/doc
…/operators.pod6 :2237:
=head2 infix C«notandthen»
perl6/doc
…/operators.pod6 :2239:
Returns L«C<Empty>
perl6/doc
…/operators.pod6 :2244:
L«C<Callable>
perl6/doc
…/operators.pod6 :2248:
L«C<Empty>
perl6/doc
…/operators.pod6 :2258:
and say 'OMG! All sensors are down!'; # OUTPUT:«OMG! All sensors are down!␤»
perl6/doc
…/operators.pod6 :2259:
say first-working-sensor Nil, Nil, Nil; # OUTPUT:«default sensor␤»
perl6/doc
…/operators.pod6 :2263:
say first-working-sensor Nil, 42, Nil; # OUTPUT:«42␤»
perl6/doc
…/operators.pod6 :2267:
L«C<without> statement modifier
perl6/doc
…/operators.pod6 :2280:
=head2 infix C«or»
perl6/doc
…/operators.pod6 :2289:
=head2 infix C«orelse»
perl6/doc
…/operators.pod6 :2297:
L«C<Callable>
perl6/doc
…/operators.pod6 :2312:
say "{.^name}, {.handled}" # OUTPUT: «Failure, True␤»
perl6/doc
…/operators.pod6 :2314:
say "{.^name}, {.handled}" # OUTPUT: «Failure, False␤»
perl6/doc
…/operators.pod6 :2316:
meows-processor3; # OUTPUT: «something's wrong␤»
perl6/doc
…/operators.pod6 :2317:
meows-processor3; # OUTPUT: «🐱␤»
perl6/doc
…/operators.pod6 :2319:
=head2 infix C«xor»
perl6/doc
…/operators.pod6 :2335:
=head2 infix C«==>»
perl6/doc
…/operators.pod6 :2398:
=head2 infix C«<==»
perl6/doc
…/packages.pod6 :56:
X«
perl6/doc
…/packages.pod6 :69:
X«
perl6/doc
…/performance.pod6 :28:
rakudo-moar abc1234: OUTPUT«0.0018558␤»
perl6/doc
…/phasers.pod6 :295:
try foo rand; # OUTPUT: «oh noes!␤»
perl6/doc
…/phasers.pod6 :298:
an L<Int> and L«C<rand>
perl6/doc
…/pod.pod6 :416:
Perl 6 makes considerable use of the « and » characters.
perl6/doc
…/pragmas.pod6 :64:
} # OUTPUT: «Failure␤»
perl6/doc
…/pragmas.pod6 :71:
} # OUTPUT: «Caught X::Str::Numeric␤»
perl6/doc
…/pragmas.pod6 :73:
Inside of a L«C<try> blocks
perl6/doc
…/pragmas.pod6 :80:
} # OUTPUT: «Caught X::Str::Numeric␤»
perl6/doc
…/pragmas.pod6 :87:
} # OUTPUT: «Failure␤»
perl6/doc
…/quoting.pod6 :44:
Q<Make sure you B«<»matchB«>» opening and closing delimiters>
perl6/doc
…/quoting.pod6 :181:
# OUTPUT: «abcDEFghi␤»
perl6/doc
…/quoting.pod6 :187:
# OUTPUT: «abc1ghi␤»
perl6/doc
…/quoting.pod6 :194:
# OUTPUT: «Str $s = "I ♥ Perl 6!"␤»
perl6/doc
…/quoting.pod6 :197:
# OUTPUT: «Str $s = "I really ♡♥❤💕 Perl 6!"␤»
perl6/doc
…/quoting.pod6 :199:
You can also use L«unicode names
perl6/doc
…/quoting.pod6 :201:
and L<name aliases
perl6/doc
…/quoting.pod6 :205:
# OUTPUT: «Str $s = "Camelia 💔 my ❤!"␤»
perl6/doc
…/quoting.pod6 :244:
X«
perl6/doc
…/quoting.pod6 :247:
say B«<»a b cB«>» L<eqv> ('a', 'b', 'c'); # OUTPUT: «True␤»
perl6/doc
…/quoting.pod6 :248:
say B«<»a b 42B«>» L<eqv> ('a', 'b', '42'); # OUTPUT: «False␤», the 42 become an IntStr allomorph
perl6/doc
…/quoting.pod6 :249:
say < 42 > ~~ Int; # OUTPUT: «True␤»
perl6/doc
…/quoting.pod6 :250:
say < 42 > ~~ Str; # OUTPUT: «True␤»
perl6/doc
…/quoting.pod6 :257:
# OUTPUT: «(IntStr.new(42, "42"), RatStr.new(2.0, "4/2"), NumStr.new(1000000e0, "1e6"), ComplexStr.new(<1+1i>, "1+1i"), "abc")␤»
perl6/doc
…/quoting.pod6 :259:
To construct a L«C<Rat>
perl6/doc
…/quoting.pod6 :262:
say <42/10>.^name; # OUTPUT: «Rat␤»
perl6/doc
…/quoting.pod6 :263:
say <1+42i>.^name; # OUTPUT: «Complex␤»
perl6/doc
…/quoting.pod6 :264:
say < 42/10 >.^name; # OUTPUT: «RatStr␤»
perl6/doc
…/quoting.pod6 :265:
say < 1+42i >.^name; # OUTPUT: «ComplexStr␤»
perl6/doc
…/quoting.pod6 :274:
close-enough-π 710/226; # OUTPUT: «Your π is close enough!␤»
perl6/doc
…/quoting.pod6 :286:
say qw{"a b" c}.perl; # OUTPUT: «("\"a", "b\"", "c")␤»
perl6/doc
…/quoting.pod6 :291:
say qww{"a b" c}.perl; # OUTPUT: «("a b", "c")␤»
perl6/doc
…/quoting.pod6 :297:
my $a = 42; say qw{$a b c}; # OUTPUT: «$a b c␤»
perl6/doc
…/quoting.pod6 :304:
say @list; # OUTPUT: «[42 b c]␤»
perl6/doc
…/quoting.pod6 :310:
.say for @list; # OUTPUT: «a␤b␤c␤»
perl6/doc
…/quoting.pod6 :312:
=head2 X<<<Word quoting with interpolation and quote protection: qqww
perl6/doc
…/quoting.pod6 :317:
my $a = 42; say qqw{"$a b" c}.perl; # OUTPUT: «("\"42", "b\"", "c")␤»
perl6/doc
…/quoting.pod6 :322:
my $a = 42; say qqww{"$a b" c}.perl; # OUTPUT: «("42 b", "c")␤»
perl6/doc
…/quoting.pod6 :326:
my $a = 42; say <<"$a b" c>>.perl; # OUTPUT: «("42 b", "c")␤»
perl6/doc
…/quoting.pod6 :327:
my $a = 42; say «"$a b" c».perl; # OUTPUT: «("42 b", "c")␤»
perl6/doc
…/quoting.pod6 :333:
say qqww{"$a" $a}.perl; # OUTPUT: «("1 2", "1", "2")␤»
perl6/doc
…/quoting.pod6 :335:
say qqww{"$b" $b}.perl; # OUTPUT: «("1 \"2 3\"", "1", "\"2", "3\"")␤»
perl6/doc
…/quoting.pod6 :364:
say $output; # OUTPUT: «hello!␤»
perl6/doc
…/quoting.pod6 :376:
say qqx{echo "hello $world"}; # OUTPUT: «hello there␤»
perl6/doc
…/quoting.pod6 :385:
say $output; # OUTPUT: «Cooley␤Cooley's␤Coolidge␤Coolidge's␤cool␤...»
perl6/doc
…/rb-nutshell.pod6 :125:
=head2 C«.» Method calls, C<.send>
perl6/doc
…/rb-nutshell.pod6 :233:
say %calories«"$key"»; # Perl 6 - double angles interpolate as double-quotes
perl6/doc
…/rb-nutshell.pod6 :244:
say %calories«$keys».join(','); # Perl 6, interpolated split
perl6/doc
…/rb-nutshell.pod6 :418:
=head2 C«== != < > <= >=» Comparisons
perl6/doc
…/rb-nutshell.pod6 :423:
=item C«== != < > <= >=» Comparisons
perl6/doc
…/rb-nutshell.pod6 :429:
=head2 C«<=>» Three-way comparisons
perl6/doc
…/rb-nutshell.pod6 :431:
In Ruby, the C«<=>» operator returns -1, 0, or 1.
perl6/doc
…/rb-nutshell.pod6 :434:
C«<=>» forces numeric context for the comparison.
perl6/doc
…/rb-nutshell.pod6 :436:
C«leg» ("Less, Equal, or Greater?") forces string context for the comparison.
perl6/doc
…/rb-nutshell.pod6 :438:
C«cmp» does either C«<=>» or C<leg>, depending on the existing type of its
perl6/doc
…/rb-nutshell.pod6 :476:
=head2 C«<< >>» Numeric shift left, right ops, shovel operator
perl6/doc
…/rb-nutshell.pod6 :478:
Replaced by C«+<» and C«+>» .
perl6/doc
…/rb-nutshell.pod6 :485:
Note that Ruby often uses the C«<<» operator as the "shovel operator", which is
perl6/doc
…/rb-nutshell.pod6 :488:
=head2 C«=>» and C<:> Key-Value Separators
perl6/doc
…/rb-nutshell.pod6 :490:
In Ruby, C«=>» is used in the context of key/value pairs for Hash literal
perl6/doc
…/rb-nutshell.pod6 :494:
In Perl 6, C«=>» is the Pair operator, which is quite different in
perl6/doc
…/rb-nutshell.pod6 :497:
If you are using C«=>» in a hash literal, then the usage is very similar:
perl6/doc
…/rb-nutshell.pod6 :681:
Ruby, unless you change C«->» to C«<->».
perl6/doc
…/rb-nutshell.pod6 :752:
require you to add the optional C<m> on a plain match like C«/abc/».
perl6/doc
…/rb-nutshell.pod6 :778:
the assertions will be surrounded by C«<>».
perl6/doc
…/rb-nutshell.pod6 :782:
=item C<[abc]> becomes C«<[abc]>»
perl6/doc
…/rb-nutshell.pod6 :784:
=item C<[^abc]> becomes C«<-[abc]>»
perl6/doc
…/rb-nutshell.pod6 :786:
=item C<[a-zA-Z]> becomes C«<[a..zA..Z]>»
perl6/doc
…/rb-nutshell.pod6 :788:
=item C<[[:upper:]]> becomes C«<:upper>»
perl6/doc
…/rb-nutshell.pod6 :790:
=item C<[abc[:upper:]]> becomes C«<[abc]+:Upper>»
perl6/doc
…/rb-nutshell.pod6 :794:
=item C<(?=[abc])> becomes C«<?[abc]>»
perl6/doc
…/rb-nutshell.pod6 :796:
=item C<(?=ar?bitrary* pattern)> becomes C«<before ar?bitrary* pattern>»
perl6/doc
…/rb-nutshell.pod6 :798:
=item C<(?!=[abc])> becomes C«<![abc]>»
perl6/doc
…/rb-nutshell.pod6 :800:
=item C<(?!=ar?bitrary* pattern)> becomes C«<!before ar?bitrary* pattern>»
perl6/doc
…/rb-nutshell.pod6 :802:
=item C«(?<=ar?bitrary* pattern)» becomes C«<after ar?bitrary* pattern>»
perl6/doc
…/rb-nutshell.pod6 :804:
=item C«(?<!ar?bitrary* pattern)» becomes C«<!after ar?bitrary* pattern>»
perl6/doc
…/rb-nutshell.pod6 :806:
(Unrelated to <> syntax, the "lookaround" C</foo\Kbar/> becomes C«/foo <( bar )> /»
perl6/doc
…/rb-nutshell.pod6 :808:
=item C<(?(?{condition))yes-pattern
perl6/doc
…/regexes.pod6 :57:
say ~$/; # OUTPUT: «de␤»
perl6/doc
…/regexes.pod6 :58:
say $/.prematch; # OUTPUT: «abc␤»
perl6/doc
…/regexes.pod6 :59:
say $/.postmatch; # OUTPUT: «f␤»
perl6/doc
…/regexes.pod6 :60:
say $/.from; # OUTPUT: «3␤»
perl6/doc
…/regexes.pod6 :61:
say $/.to; # OUTPUT: «5␤»
perl6/doc
…/regexes.pod6 :97:
'ab42' ~~ /\d/ and say ~$/; # OUTPUT: «4␤»
perl6/doc
…/regexes.pod6 :98:
'ab42' ~~ /\D/ and say ~$/; # OUTPUT: «a␤»
perl6/doc
…/regexes.pod6 :142:
say ~$/; # OUTPUT: «word␤»
perl6/doc
…/regexes.pod6 :206:
=head2 X«Unicode properties
perl6/doc
…/regexes.pod6 :215:
"a".uniprop('Script'); # OUTPUT: «Latin␤»
perl6/doc
…/regexes.pod6 :217:
"a".uniprop('Block'); # OUTPUT: «Basic Latin␤»
perl6/doc
…/regexes.pod6 :295:
'perl6' ~~ m{\w+(<:Ll+:N>)} # OUTPUT: «0 => 「6」␤»
perl6/doc
…/regexes.pod6 :297:
=head2 X«Enumerated character classes and ranges
perl6/doc
…/regexes.pod6 :377:
say so 'a' ~~ /a ** 2..5/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :378:
say so 'aaa' ~~ /a ** 2..5/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :385:
say so 'aaaaa' ~~ /a ** 5/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :391:
say so 'a' ~~ /a ** 1^..^6/; # OUTPUT: «False␤» -- there are 2 to 5 'a's in a row
perl6/doc
…/regexes.pod6 :392:
say so 'aaaa' ~~ /a ** 1^..^6/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :398:
say so 'aaa' ~~ /a ** ^6/; # OUTPUT: «True␤» -- there are 0 to 5 'a's in a row
perl6/doc
…/regexes.pod6 :404:
say so 'aaaa' ~~ /a ** 1^..*/; # OUTPUT: «True␤» -- there are 2 or more 'a's in a row
perl6/doc
…/regexes.pod6 :421:
say so 'abc,def' ~~ / ^ [\w+] ** 1 % ',' $ /; # Output: «False»
perl6/doc
…/regexes.pod6 :422:
say so 'abc,def' ~~ / ^ [\w+] ** 2 % ',' $ /; # Output: «True»
perl6/doc
…/regexes.pod6 :432:
'abababa' ~~ /a .* a/ && say ~$/; # OUTPUT: «abababa␤»
perl6/doc
…/regexes.pod6 :439:
'abababa' ~~ /a .*? a/ && say ~$/; # OUTPUT: «aba␤»
perl6/doc
…/regexes.pod6 :447:
'foooobar' ~~ /<A><B>/ # OUTPUT: «foooobar␤»
perl6/doc
…/regexes.pod6 :459:
say so 'abababa' ~~ /a .* aba/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :460:
say so 'abababa' ~~ /a .*: aba/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :491:
say ('abc' ~~ / a
perl6/doc
…/regexes.pod6 :517:
say so 'properly' ~~ / perl/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :527:
=head2 X«C<^>, Start of String and C<$>, End of String
perl6/doc
…/regexes.pod6 :531:
say so 'properly' ~~ / perl/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :532:
say so 'properly' ~~ /^ perl/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :533:
say so 'perly' ~~ /^ perl/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :534:
say so 'perl' ~~ /^ perl/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :538:
say so 'use perl' ~~ / perl /; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :539:
say so 'use perl' ~~ / perl $/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :540:
say so 'perly' ~~ / perl $/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :544:
say so 'use perl' ~~ /^ perl $/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :545:
say so 'perl' ~~ /^ perl $/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :557:
say so $str ~~ /safe $/; # OUTPUT: «True␤» -- 'safe' is at the end of the string
perl6/doc
…/regexes.pod6 :558:
say so $str ~~ /secret $/; # OUTPUT: «False␤» -- 'secret' is at the end of a line -- not the string
perl6/doc
…/regexes.pod6 :559:
say so $str ~~ /^Keep /; # OUTPUT: «True␤» -- 'Keep' is at the start of the string
perl6/doc
…/regexes.pod6 :560:
say so $str ~~ /^and /; # OUTPUT: «False␤» -- 'and' is at the start of a line -- not the string
perl6/doc
…/regexes.pod6 :562:
=head2 X«C<^^>, Start of Line and C<$$>, End of Line
perl6/doc
…/regexes.pod6 :586:
say so $str ~~ /^^ There/; # OUTPUT: «True␤» -- start of string
perl6/doc
…/regexes.pod6 :587:
say so $str ~~ /^^ limericks/; # OUTPUT: «False␤» -- not at the start of a line
perl6/doc
…/regexes.pod6 :588:
say so $str ~~ /^^ I/; # OUTPUT: «True␤» -- start of the last line
perl6/doc
…/regexes.pod6 :589:
say so $str ~~ /^^ When/; # OUTPUT: «False␤» -- there are blanks between
perl6/doc
…/regexes.pod6 :592:
say so $str ~~ / Japan $$/; # OUTPUT: «True␤» -- end of first line
perl6/doc
…/regexes.pod6 :593:
say so $str ~~ / scan $$/; # OUTPUT: «False␤» -- there's a . between "scan"
perl6/doc
…/regexes.pod6 :595:
say so $str ~~ / '."' $$/; # OUTPUT: «True␤» -- at the last line
perl6/doc
…/regexes.pod6 :599:
=head2 X«C«<
perl6/doc
…/regexes.pod6 :601:
To match any word boundary, use C«<
perl6/doc
…/regexes.pod6 :602:
languages’ X«C<\b>
perl6/doc
…/regexes.pod6 :606:
=head2 X<<<<C<<< << >>> and C<<< >> >>>, left and right word boundary
perl6/doc
…/regexes.pod6 :617:
say so $str ~~ /br/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :618:
say so $str ~~ /<< br/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :619:
say so $str ~~ /br >>/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :620:
say so $str ~~ /own/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :621:
say so $str ~~ /<< own/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :622:
say so $str ~~ /own >>/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :624:
You can also use the variants C<«> and C<»> :
perl6/doc
…/regexes.pod6 :627:
say so $str ~~ /« own/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :628:
say so $str ~~ /own »/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :630:
=head1 X«Grouping and Capturing
perl6/doc
…/regexes.pod6 :636:
say (1 + 4) * 2; # OUTPUT: «10␤»
perl6/doc
…/regexes.pod6 :669:
say "0: $0; 1: $1"; # OUTPUT: «0: a; 1: c␤»
perl6/doc
…/regexes.pod6 :680:
say $/.list.join: ', ' # OUTPUT: «a, c␤»
perl6/doc
…/regexes.pod6 :692:
say ~$0; # OUTPUT: «c␤»
perl6/doc
…/regexes.pod6 :743:
say "11" ~~ /(\d) ($0)/; # OUTPUT: «Nil␤»
perl6/doc
…/regexes.pod6 :748:
# OUTPUT: «「11」␤ 0 => 「1」␤ 1 => 「1」␤»
perl6/doc
…/regexes.pod6 :756:
say ~$<myname> # OUTPUT: «abc␤»
perl6/doc
…/regexes.pod6 :765:
say ~$<string>; # OUTPUT: «abc-abc-abc␤»
perl6/doc
…/regexes.pod6 :766:
say ~$<string><part>; # OUTPUT: «abc abc abc␤»
perl6/doc
…/regexes.pod6 :774:
say %h.keys.sort.join: ', '; # OUTPUT: «value, variable␤»
perl6/doc
…/regexes.pod6 :775:
say %h.values.sort.join: ', '; # OUTPUT: «23, count␤»
perl6/doc
…/regexes.pod6 :786:
=head2 X«Capture markers: C«<( )>»
perl6/doc
…/regexes.pod6 :788:
A C«<(» token indicates the start of the match's overall capture, while the corresponding C«)>»
perl6/doc
…/regexes.pod6 :789:
token indicates its endpoint. The C«<(» is similar to other languages X<\K
perl6/doc
…/regexes.pod6 :832:
.say; # OUTPUT: «some 22 words 42␤»
perl6/doc
…/regexes.pod6 :847:
.say; # OUTPUT: «The Entrapments␤»
perl6/doc
…/regexes.pod6 :855:
.say # OUTPUT: «Party like it's 1999␤»
perl6/doc
…/regexes.pod6 :864:
.say; # OUTPUT: «There can be only two␤»
perl6/doc
…/regexes.pod6 :875:
.say; # OUTPUT: «Blake's 7␤»
perl6/doc
…/regexes.pod6 :888:
.say; # OUTPUT: «today 18:09:00␤»
perl6/doc
…/regexes.pod6 :889:
"$1-$2-$0".say; # OUTPUT: «01-23-2016␤»
perl6/doc
…/regexes.pod6 :890:
"$/[1]-$/[2]-$/[0]".say; # OUTPUT: «01-23-2016␤»
perl6/doc
…/regexes.pod6 :899:
.say; # OUTPUT: «01-23-2016 18:09:00␤»
perl6/doc
…/regexes.pod6 :906:
.say; # OUTPUT: «6:38 PM␤»
perl6/doc
…/regexes.pod6 :909:
but is otherwise the same as C« $0 < 12 ?? $0 !! $0 - 12 ». When combined with
perl6/doc
…/regexes.pod6 :928:
.say; # OUTPUT: «I can say "banana,nana," but I don't ...␤»
perl6/doc
…/regexes.pod6 :942:
.say; # OUTPUT: «Fruit␤»
perl6/doc
…/regexes.pod6 :945:
.say; # OUTPUT: «vegetable␤»
perl6/doc
…/regexes.pod6 :997:
A.parse: '[good]'; # OUTPUT: «「[good]」␤»
perl6/doc
…/regexes.pod6 :1000:
# OUTPUT: «X::AdHoc: Cannot find ']' near position 5␤»
perl6/doc
…/regexes.pod6 :1005:
"3)" ~~ / <?> ~ ')' \d+ /; # RESULT: «「3)」»
perl6/doc
…/regexes.pod6 :1006:
"(3)" ~~ / <?> ~ ')' \d+ /; # RESULT: «「3)」»
perl6/doc
…/regexes.pod6 :1013:
say $0; # OUTPUT: «「c」␤»
perl6/doc
…/regexes.pod6 :1014:
say $1; # OUTPUT: «「b」␤»
perl6/doc
…/regexes.pod6 :1023:
say "First line: ", $<line>.chomp; # OUTPUT: «First line: abc␤»
perl6/doc
…/regexes.pod6 :1066:
# OUTPUT: «("passwords" => {"jack" => "password1", "joy" => "muchmoresecure123"},␤
perl6/doc
…/regexes.pod6 :1101:
# OUTPUT: «ba␤aA␤»
perl6/doc
…/regexes.pod6 :1157:
say so 'abc' ~~ / \w+ . /; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1158:
say so 'abc' ~~ / :r \w+ . /; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1188:
say so "I used Photoshop®" ~~ m:i/ photo shop /; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1189:
say so "I used a photo shop" ~~ m:iB<:s>/ photo shop /; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1190:
say so "I used Photoshop®" ~~ m:iB<:s>/ photo shop /; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1198:
Where whitespace in a regex turns into C«<.ws>» depends on what comes before
perl6/doc
…/regexes.pod6 :1200:
doesn't turn into C«<.ws>», but whitespace after characters does. In
perl6/doc
…/regexes.pod6 :1202:
it will turn into C«<.ws>».
perl6/doc
…/regexes.pod6 :1205:
(C<+>, C<*>, or C<?>), C«<.ws>» will be matched after every match of the
perl6/doc
…/regexes.pod6 :1206:
term. So, C<foo +> becomes C«[ foo <.ws> ]+». On the other hand, whitespace
perl6/doc
…/regexes.pod6 :1208:
becomes C«foo+ <.ws>».
perl6/doc
…/regexes.pod6 :1234:
^^ B«<.ws>»
perl6/doc
…/regexes.pod6 :1238:
<.assertion_and_then_ws> B«<.ws>»
perl6/doc
…/regexes.pod6 :1239:
characters_with_ws_after+ B«<.ws>»
perl6/doc
…/regexes.pod6 :1240:
[ws_separated_characters B«<.ws>»]* B«<.ws>»
perl6/doc
…/regexes.pod6 :1242:
perl6/doc
…/regexes.pod6 :1243:
perl6/doc
…/regexes.pod6 :1244:
] B«<.ws>»
perl6/doc
…/regexes.pod6 :1246:
$foo B«<.ws>»
perl6/doc
…/regexes.pod6 :1253:
Grammars provide an easy way to override what C«<.ws>» matches:
perl6/doc
…/regexes.pod6 :1266:
say so Demo.parse("ab."); # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1267:
say so Demo.parse("a b."); # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1268:
say so Demo.parse("a\tb ."); # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1271:
say so Demo.parse("a\tb\n."); # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1281:
so 'hello world' ~~ m:Perl5/^hello (world)/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1282:
so 'hello world' ~~ m/^hello (world)/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1283:
so 'hello world' ~~ m/^ 'hello ' ('world')/; # OUTPUT: «True␤»
perl6/doc
…/regexes.pod6 :1305:
say ~m/a./; # OUTPUT: «a1␤»
perl6/doc
…/regexes.pod6 :1306:
say ~m:c(2)/a./; # OUTPUT: «a2␤»
perl6/doc
…/regexes.pod6 :1312:
say "abcdefg" ~~ m:c(3)/e.+/; # OUTPUT: «「efg」␤»
perl6/doc
…/regexes.pod6 :1313:
say "abcdefg" ~~ m:p(3)/e.+/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1351:
say @matches.elems; # OUTPUT: «3␤»
perl6/doc
…/regexes.pod6 :1352:
say ~@matches[2]; # OUTPUT: «here␤»
perl6/doc
…/regexes.pod6 :1363:
say $match.from; # OUTPUT: «2␤»
perl6/doc
…/regexes.pod6 :1364:
say ~$match; # OUTPUT: «cdef␤»
perl6/doc
…/regexes.pod6 :1372:
say "abcdefg" ~~ m:c(3)/e.+/; # OUTPUT: «「efg」␤»
perl6/doc
…/regexes.pod6 :1373:
say "abcdefg" ~~ m:p(3)/e.+/; # OUTPUT: «False␤»
perl6/doc
…/regexes.pod6 :1412:
say "foobar" ~~ rx{ foo <?before bar> }; # OUTPUT: «foo␤»
perl6/doc
…/regexes.pod6 :1439:
say "foobar" ~~ rx{ <?after foo> bar }; # OUTPUT: «bar␤»
perl6/doc
…/setbagmix.pod6 :105:
say 2 (elem) (1, 2, 3).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :106:
say 4 (elem) (1, 2, 3).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :114:
Equivalent to L«(elem)
perl6/doc
…/setbagmix.pod6 :125:
say 2 !(elem) (1, 2, 3).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :126:
say 4 !(elem) (1, 2, 3).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :137:
say (1, 2, 3).Set (cont) 2; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :138:
say (1, 2, 3).Set (cont) 4; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :146:
Equivalent to L«(cont)
perl6/doc
…/setbagmix.pod6 :157:
say (1, 2, 3).Set !(cont) 2; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :158:
say (1, 2, 3).Set !(cont) 4; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :171:
say (1, 2, 3).Set (<=) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :172:
say (1, 3).Set (<=) (2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :173:
say ∅ (<=) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :181:
Equivalent to L«(<=)», at codepoint U+2286 (SUBSET OF OR EQUAL TO).
perl6/doc
…/setbagmix.pod6 :189:
Equivalent to C«!(<=)», at codepoint U+2288 (NEITHER A SUBSET OF NOR EQUAL TO).
perl6/doc
…/setbagmix.pod6 :191:
say (1, 2, 3).Set !(<=) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :192:
say (1, 3).Set ⊈ (2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :205:
say (1, 2, 3).Set (<) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :206:
say (1, 3).Set (<) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :207:
say ∅ (<) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :215:
Equivalent to L«(<)», at codepoint U+2282 (SUBSET OF).
perl6/doc
…/setbagmix.pod6 :223:
Equivalent to C«!(<)», at codepoint U+2284 (NOT A SUBSET OF).
perl6/doc
…/setbagmix.pod6 :225:
say (1, 2, 3).Set !(<) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :226:
say (1, 3).Set ⊄ (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :235:
Like L«(<=)» with reversed arguments. Returns C<True> if C<$a> is a
perl6/doc
…/setbagmix.pod6 :238:
say (1, 2, 3).Set (>=) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :239:
say (1, 3).Set (>=) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :240:
say ∅ (>=) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :248:
Equivalent to L«(>=)», at codepoint U+2287 (SUPERSET OF OR EQUAL TO).
perl6/doc
…/setbagmix.pod6 :256:
Equivalent to C«!(>=)», at codepoint U+2289 (NEITHER A SUPERSET OF
perl6/doc
…/setbagmix.pod6 :259:
say (1, 2, 3).Set !(>=) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :260:
say (1, 3).Set ⊉ (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :269:
Like L«(<)» with reversed arguments. Returns C<True> if C<$a> is a
perl6/doc
…/setbagmix.pod6 :272:
say (1, 2, 3, 4).Set (>) (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :273:
say (1, 3).Set (>) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :274:
say ∅ (>) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :282:
Equivalent to L«(>)», at codepoint U+2283 (SUPERSET OF).
perl6/doc
…/setbagmix.pod6 :290:
Equivalent to C«!(>)», at codepoint U+2285 (NOT A SUPERSET OF).
perl6/doc
…/setbagmix.pod6 :292:
say (1, 2, 3, 4).Set !(>) (3, 2, 1).Set; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :293:
say (1, 3).Set ⊅ (3, 2, 1).Set; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :306:
say (1, 2, 3).Bag (<+) (3, 2, 1).Bag; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :307:
say (1, 2, 2, 3).Bag (<+) (3, 2, 1).Bag; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :315:
Equivalent to L«(<+)», at codepoint U+227C (PRECEDES OR EQUAL TO).
perl6/doc
…/setbagmix.pod6 :328:
say (1, 2, 3).Bag (>+) (3, 2, 1).Bag; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :329:
say (1, 2, 2, 3).Bag (>+) (3, 2, 1).Bag; # OUTPUT: «True␤»
perl6/doc
…/setbagmix.pod6 :330:
say (1, 2).Bag (>+) (3, 2, 1).Bag; # OUTPUT: «False␤»
perl6/doc
…/setbagmix.pod6 :338:
Equivalent to L«(>+)», at codepoint U+227D (SUCCEEDS OR EQUAL TO).
perl6/doc
…/setbagmix.pod6 :370:
Equivalent to L«(V<
perl6/doc
…/setbagmix.pod6 :400:
Equivalent to L«(&)», at codepoint U+2229 (INTERSECTION).
perl6/doc
…/setbagmix.pod6 :429:
Equivalent to L«(-)».
perl6/doc
…/setbagmix.pod6 :450:
Equivalent to L«(^)», at codepoint U+2296 (CIRCLED MINUS).
perl6/doc
…/setbagmix.pod6 :473:
Equivalent to L«infix (.)
perl6/doc
…/setbagmix.pod6 :495:
Equivalent to L«(+)», at codepoint U+228E (MULTISET UNION).
perl6/doc
…/subscripts.pod6 :31:
say @chores[0]; # OUTPUT: «buy groceries␤»
perl6/doc
…/subscripts.pod6 :32:
say @chores[1]; # OUTPUT: «feed dog␤»
perl6/doc
…/subscripts.pod6 :33:
say @chores[2]; # OUTPUT: «wash car␤»
perl6/doc
…/subscripts.pod6 :45:
say %grade{"Zoe"}; # OUTPUT: «C␤»
perl6/doc
…/subscripts.pod6 :46:
say %grade{"Ben"}; # OUTPUT: «B+␤»
perl6/doc
…/subscripts.pod6 :49:
say $stats{ Date.new(2015, 4, 4) + 1 }; # OUTPUT: «17.253␤»
perl6/doc
…/subscripts.pod6 :56:
say %grade<Zoe>; # OUTPUT: «C␤»
perl6/doc
…/subscripts.pod6 :57:
say %grade<Ben>; # OUTPUT: «B+␤»
perl6/doc
…/subscripts.pod6 :64:
%hash«foo "$var"»; # same as %hash{ «foo "$var"» }
perl6/doc
…/subscripts.pod6 :83:
( 1 => 1 ).perl.say; # OUTPUT: «1 => 1␤»
perl6/doc
…/subscripts.pod6 :84:
my %h; %h{1} = 1; say %h.perl; # OUTPUT: «{ "1" => 1 }␤»
perl6/doc
…/subscripts.pod6 :85:
( 1/2 => 1 ).perl.say; # OUTPUT: «0.5 => 1␤»
perl6/doc
…/subscripts.pod6 :86:
my %h; %h{1/2} = 1; say %h.perl; # OUTPUT: «{ "0.5" => 1 }␤»
perl6/doc
…/subscripts.pod6 :87:
( pi => 1 ).perl.say; # OUTPUT: «:pi(1)␤»
perl6/doc
…/subscripts.pod6 :88:
my %h; %h{pi} = 1; say %h.perl; # OUTPUT: «{ "3.14159265358979" => 1 }␤»
perl6/doc
…/subscripts.pod6 :96:
%h{pi} = 1; %h.perl.say; # OUTPUT: «(3.14159265358979e0=>1).MixHash␤»
perl6/doc
…/subscripts.pod6 :107:
say "__Hello__".match(/__(.*)__/)[0]; # OUTPUT: «「Hello」␤»
perl6/doc
…/subscripts.pod6 :119:
say 42[0]; # OUTPUT: «42␤»
perl6/doc
…/subscripts.pod6 :133:
my @array1; say @array1[10]; # OUTPUT: «(Any)␤»
perl6/doc
…/subscripts.pod6 :134:
my Int @array2; say @array2[10]; # OUTPUT: «(Int)␤»
perl6/doc
…/subscripts.pod6 :136:
my %hash1; say %hash1<foo>; # OUTPUT: «(Any)␤»
perl6/doc
…/subscripts.pod6 :137:
my Int %hash2; say %hash2<foo>; # OUTPUT: «(Int)␤»
perl6/doc
…/subscripts.pod6 :140:
my @array3 is default('--'); say @array3[10]; # OUTPUT: «--␤»
perl6/doc
…/subscripts.pod6 :141:
my Int @array4 is default(17); say @array4[10]; # OUTPUT: «17␤»
perl6/doc
…/subscripts.pod6 :143:
my %hash3 is default('Empty'); say %hash3<foo>; # OUTPUT: «Empty␤»
perl6/doc
…/subscripts.pod6 :144:
my Int %hash4 is default(4711); say %hash4<foo>; # OUTPUT: «4711␤»
perl6/doc
…/subscripts.pod6 :149:
say (0, 10, 20)[3]; # OUTPUT: «Nil␤»
perl6/doc
…/subscripts.pod6 :150:
say bag(<a a b b b>)<c>; # OUTPUT: «0␤»
perl6/doc
…/subscripts.pod6 :151:
say array[uint8].new(1, 2)[2] # OUTPUT: «0␤»
perl6/doc
…/subscripts.pod6 :164:
say @alphabet[*-1]; # OUTPUT: «Z␤»
perl6/doc
…/subscripts.pod6 :165:
say @alphabet[*-2]; # OUTPUT: «Y␤»
perl6/doc
…/subscripts.pod6 :166:
say @alphabet[*-3]; # OUTPUT: «X␤»
perl6/doc
…/subscripts.pod6 :198:
dd @alphabet[15, 4, *-9, 11]; # OUTPUT: «("p", "e", "r", "l")␤»
perl6/doc
…/subscripts.pod6 :203:
dd %color{"cherry", "kiwi"}; # OUTPUT: «("red", "green")␤»
perl6/doc
…/subscripts.pod6 :204:
dd %color<cherry kiwi>; # OUTPUT: «("red", "green")␤»
perl6/doc
…/subscripts.pod6 :205:
dd %color{*}; # OUTPUT: «("green", "red", "yellow")␤»
perl6/doc
…/subscripts.pod6 :232:
dd @alphabet[2,]; # OUTPUT: «("c",)␤»
perl6/doc
…/subscripts.pod6 :233:
dd @alphabet[2]; # OUTPUT: «"c"␤»
perl6/doc
…/subscripts.pod6 :245:
dd @alphabet[0, (1..2, (3,))]; # OUTPUT: «("a", (("b", "c"), ("d",)))␤»
perl6/doc
…/subscripts.pod6 :246:
dd @alphabet[0, (1..2, [3,])]; # OUTPUT: «("a", (("b", "c"), ("d",)))␤»
perl6/doc
…/subscripts.pod6 :247:
dd @alphabet[flat 0, (1..2, (3,))]; # OUTPUT: «("a", "b", "c", "d")␤»
perl6/doc
…/subscripts.pod6 :248:
dd flat @alphabet[0, (1..2, (3,))]; # OUTPUT: «("a", "b", "c", "d")␤»
perl6/doc
…/subscripts.pod6 :262:
dd @letters[3, 4, 5, 6, 7]; # OUTPUT: «("d", "e", "f", Any, Any)␤»
perl6/doc
…/subscripts.pod6 :263:
dd @letters[3 .. 7]; # OUTPUT: «("d", "e", "f")␤»
perl6/doc
…/subscripts.pod6 :291:
dd flat @letters[0, 7, @a]; # OUTPUT: «("a", Any, "c", "d", "e", "f")␤»
perl6/doc
…/subscripts.pod6 :292:
dd flat @letters[0, 7, @a]; # OUTPUT: «("a", Any, "c", "d", "e", "f", Any)␤»
perl6/doc
…/subscripts.pod6 :327:
dd %bag<>; # OUTPUT: «("orange"=>1,"apple"=>3).Bag␤»
perl6/doc
…/subscripts.pod6 :328:
dd %bag{}; # OUTPUT: «("orange"=>1,"apple"=>3).Bag␤»
perl6/doc
…/subscripts.pod6 :329:
dd %bag{*}; # OUTPUT: «(1, 3)␤»
perl6/doc
…/subscripts.pod6 :330:
dd %bag{()}; # OUTPUT: «()␤»
perl6/doc
…/subscripts.pod6 :336:
say "Hello, @words[]!" # OUTPUT: «Hello, cruel world!␤»
perl6/doc
…/subscripts.pod6 :345:
# OUTPUT: «Array @twodim = [("a", "b", "c"), (1, 2, 3)]␤»
perl6/doc
…/subscripts.pod6 :347:
# OUTPUT: «("b", 2)␤»
perl6/doc
…/subscripts.pod6 :353:
# OUTPUT: «Array @toomany = [["a", "b"], [1, 2]]␤»
perl6/doc
…/subscripts.pod6 :355:
# OUTPUT: «("a", "b", 1, 2)␤»
perl6/doc
…/subscripts.pod6 :362:
# OUTPUT: «(2 4)␤»
perl6/doc
…/subscripts.pod6 :365:
# OUTPUT: «((2 a 4) (5 b 3) (1 c 6))␤»
perl6/doc
…/subscripts.pod6 :382:
say $beatles.perl; # OUTPUT: «${"White Album" => $["Back in the U.S.S.R."]}␤»
perl6/doc
…/subscripts.pod6 :415:
dd @a; # OUTPUT: «Array @a = [10, 11, 3, 13]␤»
perl6/doc
…/subscripts.pod6 :416:
dd $x; # OUTPUT: «Int $x = 3␤»
perl6/doc
…/subscripts.pod6 :449:
dd @foo[0].defined; # OUTPUT: «False␤»
perl6/doc
…/subscripts.pod6 :450:
dd @foo[0]:exists; # OUTPUT: «True␤»
perl6/doc
…/subscripts.pod6 :451:
dd @foo[2]:exists; # OUTPUT: «False␤»
perl6/doc
…/subscripts.pod6 :452:
dd @foo[0, 2]:exists; # OUTPUT: «(True, False)␤»
perl6/doc
…/subscripts.pod6 :455:
dd %fruit<apple>.defined; # OUTPUT: «False␤»
perl6/doc
…/subscripts.pod6 :456:
dd %fruit<apple>:exists; # OUTPUT: «True␤»
perl6/doc
…/subscripts.pod6 :457:
dd %fruit<banana>:exists; # OUTPUT: «False␤»
perl6/doc
…/subscripts.pod6 :458:
dd %fruit<apple banana>:exists; # OUTPUT: «(True, False)␤»
perl6/doc
…/subscripts.pod6 :463:
dd %fruit<apple banana>:!exists; # OUTPUT: «(False, True)␤»
perl6/doc
…/subscripts.pod6 :486:
dd @tens[3]:delete; # OUTPUT: «Int @tens = 30␤»
perl6/doc
…/subscripts.pod6 :487:
dd @tens; # OUTPUT: «Array @tens = [0, 10, 20]␤»
perl6/doc
…/subscripts.pod6 :490:
dd %fruit<apple>:delete; # OUTPUT: «5␤»
perl6/doc
…/subscripts.pod6 :491:
dd %fruit<peach orange>:delete; # OUTPUT: «(17, 10)␤»
perl6/doc
…/subscripts.pod6 :492:
dd %fruit; # OUTPUT: «Hash %fruit = {:banana(4)}␤»
perl6/doc
…/subscripts.pod6 :502:
# OUTPUT: «False␤»
perl6/doc
…/subscripts.pod6 :504:
# OUTPUT: «1␤(Any)␤3␤»
perl6/doc
…/subscripts.pod6 :527:
dd @tens[1]:p; # OUTPUT: «1 => 10␤»
perl6/doc
…/subscripts.pod6 :528:
dd @tens[0, 4, 2]:p; # OUTPUT: «(0 => 0, 2 => 20)␤»
perl6/doc
…/subscripts.pod6 :531:
dd %month<Feb>:p; # OUTPUT: «"Feb" => 2␤»
perl6/doc
…/subscripts.pod6 :532:
dd %month<Jan Foo Mar>:p; # OUTPUT: «("Jan" => 1, "Mar" => 3)␤»
perl6/doc
…/subscripts.pod6 :537:
dd %month<Jan Foo Mar>:!p; # OUTPUT: «("Jan" => 1, "Foo" => Any, "Mar" => 3)␤»
perl6/doc
…/subscripts.pod6 :552:
dd @tens[1]:kv; # OUTPUT: «(1, 10)␤»
perl6/doc
…/subscripts.pod6 :553:
dd @tens[0, 4, 2]:kv; # OUTPUT: «(0, 0, 2, 20)␤»
perl6/doc
…/subscripts.pod6 :556:
dd %month<Feb>:kv; # OUTPUT: «("Feb", 2)␤»
perl6/doc
…/subscripts.pod6 :557:
dd %month<Jan Foo Mar>:kv; # OUTPUT: «("Jan", 1, "Mar", 3)␤»
perl6/doc
…/subscripts.pod6 :562:
dd %month<Jan Foo Mar>:!kv; # OUTPUT: «("Jan", 1, "Foo", Any, "Mar", 3)␤»
perl6/doc
…/subscripts.pod6 :583:
dd @tens[1]:k; # OUTPUT: «1␤»
perl6/doc
…/subscripts.pod6 :584:
dd @tens[0, 4, 2]:k; # OUTPUT: «(0, 2)␤»
perl6/doc
…/subscripts.pod6 :587:
dd %month<Feb>:k; # OUTPUT: «"Feb"␤»
perl6/doc
…/subscripts.pod6 :588:
dd %month<Jan Foo Mar>:k; # OUTPUT: «("Jan", "Mar")␤»
perl6/doc
…/subscripts.pod6 :593:
dd %month<Jan Foo Mar>:!k; # OUTPUT: «("Jan", "Foo", "Mar")␤»
perl6/doc
…/subscripts.pod6 :605:
dd @tens[1]:v; # OUTPUT: «10␤»
perl6/doc
…/subscripts.pod6 :606:
dd @tens[0, 4, 2]:v; # OUTPUT: «(0, 20)␤»
perl6/doc
…/subscripts.pod6 :611:
dd %month<Feb>:v; # OUTPUT: «2␤»
perl6/doc
…/subscripts.pod6 :612:
dd %month<Jan Foo Mar>:v; # OUTPUT: «(1, 3)␤»
perl6/doc
…/subscripts.pod6 :618:
dd %month<Jan Foo Mar>:!v; # OUTPUT: «(1, Any, 3)␤»
perl6/doc
…/subscripts.pod6 :664:
say $request.header.^name; # OUTPUT: «HTTP::Header␤»
perl6/doc
…/subscripts.pod6 :670:
say $request.header<Accept-Language>.perl; # OUTPUT: «["en", "fr"]␤»
perl6/doc
…/syntax.pod6 :243:
dd $Foo::Bar::buzz; # OUTPUT: «Int $v = 42␤»
perl6/doc
…/syntax.pod6 :251:
# OUTPUT: «("\$=pod", "!UNIT_MARKER", "EXPORT", "\$_", "\$!", "::?PACKAGE",
perl6/doc
…/syntax.pod6 :261:
say $a:foo«$c»;
perl6/doc
…/syntax.pod6 :262:
# OUTPUT: «answer␤»
perl6/doc
…/syntax.pod6 :269:
You can use C«term:<>» to introduce new terms.
perl6/doc
…/syntax.pod6 :275:
# OUTPUT: «1..1␤ok 1 - ␤»
perl6/doc
…/syntax.pod6 :344:
say Int; # OUTPUT: «(Int)␤»
perl6/doc
…/syntax.pod6 :357:
say Foo.type-name; # OUTPUT: «Foo␤»
perl6/doc
…/syntax.pod6 :508:
say ['a', 'b', 42].join(' '); # OUTPUT: «a b 42␤»
perl6/doc
…/syntax.pod6 :516:
say [@a].perl; # OUTPUT: «[1, 2]␤»
perl6/doc
…/syntax.pod6 :517:
say [@a,].perl; # OUTPUT: «[[1, 2],]␤»
perl6/doc
…/syntax.pod6 :523:
say [@a, 3, 4].perl; # OUTPUT: «[[1, 2], 3, 4]␤»
perl6/doc
…/syntax.pod6 :524:
say [
perl6/doc
…/syntax.pod6 :534:
# OUTPUT: «a => 3, b => 23, dog => cat, foo => True, french => fries␤»
perl6/doc
…/syntax.pod6 :536:
say {a => 73, foo => "fish"}.keys.join(" "); # OUTPUT: «a foo␤»
perl6/doc
…/syntax.pod6 :550:
say :{ -1 => 41, 0 => 42, 1 => 43 }<0>; # OUTPUT: «(Any)␤»
perl6/doc
…/syntax.pod6 :551:
say :{ -1 => 41, 0 => 42, 1 => 43 }{0}; # OUTPUT: «42␤»
perl6/doc
…/syntax.pod6 :571:
say "match!" if 5, "fish" ~~ :(Int, Str); # OUTPUT: «match!␤»
perl6/doc
…/syntax.pod6 :574:
say "match!" if (5, "fish") ~~ $sig; # OUTPUT: «match!␤»
perl6/doc
…/syntax.pod6 :700:
say [+] <1 2 3 4 5>; # OUTPUT: «15␤»
perl6/doc
…/syntax.pod6 :703:
Wrap an infix operator in C<« »> (or the ASCII equivalent C<<< >>>) to create a
perl6/doc
…/syntax.pod6 :706:
say <1 2 3> «+» <4 5 6> # OUTPUT: «(5 7 9)␤»
perl6/doc
…/syntax.pod6 :711:
@a «+« @b # Result is the size of @b, elements from @a will be re-used
perl6/doc
…/syntax.pod6 :713:
@a «+» @b # Result is the size of the biggest input, the smaller one is re-used
perl6/doc
…/syntax.pod6 :714:
@a »+« @b # Exception if @a and @b are different sizes
perl6/doc
…/syntax.pod6 :719:
say -« <1 2 3> # OUTPUT: «(-1 -2 -3)␤»
perl6/doc
…/terms.pod6 :92:
L<Pair> objects can be created either with C<< infix:«=>» >> (which
perl6/doc
…/terms.pod6 :113:
«a b c»
perl6/doc
…/terms.pod6 :199:
# OUTPUT: «65536␤»
perl6/doc
…/testing.pod6 :24:
=item L«C<plan>
perl6/doc
…/testing.pod6 :27:
=item L«C<done-testing>
perl6/doc
…/testing.pod6 :30:
=item L«C<bail-out>
perl6/doc
…/testing.pod6 :33:
=item L«C<todo>
perl6/doc
…/testing.pod6 :36:
=item L«C<skip>
perl6/doc
…/testing.pod6 :39:
=item L«C<skip-rest>
perl6/doc
…/testing.pod6 :43:
=item L«C<diag>
perl6/doc
…/testing.pod6 :46:
=item L«C<subtest>
perl6/doc
…/testing.pod6 :50:
=item L«C<pass>
perl6/doc
…/testing.pod6 :53:
=item L«C<flunk>
perl6/doc
…/testing.pod6 :57:
=item L«C<ok>
perl6/doc
…/testing.pod6 :60:
=item L«C<nok>
perl6/doc
…/testing.pod6 :64:
=item L«C<cmp-ok>
perl6/doc
…/testing.pod6 :67:
=item L«C<is>
perl6/doc
…/testing.pod6 :70:
=item L«C<is-deeply>
perl6/doc
…/testing.pod6 :73:
=item L«C<isnt>
perl6/doc
…/testing.pod6 :76:
=item L«C<is-approx>
perl6/doc
…/testing.pod6 :80:
=item L«C<like>
perl6/doc
…/testing.pod6 :83:
=item L«C<unlike>
perl6/doc
…/testing.pod6 :87:
=item L«C<use-ok>
perl6/doc
…/testing.pod6 :90:
=item L«C<isa-ok>
perl6/doc
…/testing.pod6 :93:
=item L«C<does-ok>
perl6/doc
…/testing.pod6 :96:
=item L«C<can-ok>
perl6/doc
…/testing.pod6 :100:
=item L«C<dies-ok>
perl6/doc
…/testing.pod6 :103:
=item L«C<lives-ok>
perl6/doc
…/testing.pod6 :106:
=item L«C<eval-dies-ok>
perl6/doc
…/testing.pod6 :109:
=item L«C<eval-lives-ok>
perl6/doc
…/testing.pod6 :112:
=item L«C<throws-like>
perl6/doc
…/testing.pod6 :196:
call L«C<exit>
perl6/doc
…/testing.pod6 :203:
C<subtest>'s L«C<Callable>
perl6/doc
…/testing.pod6 :217:
L«C<skip-rest>
perl6/doc
…/testing.pod6 :220:
L«C<bail-out>
perl6/doc
…/testing.pod6 :305:
L«C<is-deeply> routine
perl6/doc
…/testing.pod6 :445:
L«C<cmp-ok $got, 'eqv', $expected, $desc>
perl6/doc
…/testing.pod6 :761:
See also L«C<plan :skip-all('...')>
perl6/doc
…/testing.pod6 :763:
L«C<bail-out>
perl6/doc
…/testing.pod6 :782:
L«C<skip-rest>
perl6/doc
…/testing.pod6 :783:
or L«C<plan :skip-all('...')>
perl6/doc
…/traps.pod6 :70:
# OUTPUT: «Cannot assign to an immutable value␤»
perl6/doc
…/traps.pod6 :106:
say A.new(x => 42).x; # OUTPUT: «Any␤»
perl6/doc
…/traps.pod6 :146:
say A.new(x => 42).x; # OUTPUT: «42␤»
perl6/doc
…/traps.pod6 :159:
say 'a b' ~~ /a b/; # OUTPUT: «False␤»
perl6/doc
…/traps.pod6 :232:
my $a = 2; say join ",", ($a, ++$a): # OUTPUT: «3,3␤»
perl6/doc
…/traps.pod6 :242:
my $a = 2; say join ",", (+$a, ++$a); # OUTPUT: «2,3␤»
perl6/doc
…/traps.pod6 :339:
say @array[-1]; # OUTPUT: «eve␤»
perl6/doc
…/traps.pod6 :347:
say @array[*-1]; # OUTPUT: «eve␤»
perl6/doc
…/traps.pod6 :353:
say @array.tail; # OUTPUT: «eve␤»
perl6/doc
…/traps.pod6 :354:
say @array.tail(2); # OUTPUT: «(charlie eve)␤»
perl6/doc
…/traps.pod6 :382:
bar(@b); # OUTPUT: «42␤»
perl6/doc
…/traps.pod6 :409:
# OUTPUT: «1()$b()␤»
perl6/doc
…/traps.pod6 :416:
say Q:c«{$a}()$b()»;
perl6/doc
…/traps.pod6 :417:
# OUTPUT: «1()$b()␤»
perl6/doc
…/traps.pod6 :424:
say "cba".sort; # OUTPUT: «(cba)␤»
perl6/doc
…/traps.pod6 :425:
say "cba".comb.sort.join; # OUTPUT: «abc␤»
perl6/doc
…/traps.pod6 :429:
In Perl 6, L«C<.chars>
perl6/doc
…/traps.pod6 :431:
If you need the number of codepoints, you should use L«C<.codes>
perl6/doc
…/traps.pod6 :435:
say "\c[LATIN SMALL LETTER J WITH CARON, COMBINING DOT BELOW]"; # OUTPUT: «ǰ̣»
perl6/doc
…/traps.pod6 :436:
say 'ǰ̣'.codes; # OUTPUT: «
perl6/doc
…/traps.pod6 :437:
say 'ǰ̣'.chars; # OUTPUT: «
perl6/doc
…/traps.pod6 :438:
say 'ǰ̣'.encode.bytes; # OUTPUT: «
perl6/doc
…/traps.pod6 :447:
you need to use L«C<UTF8-C8>
perl6/doc
…/traps.pod6 :453:
L<allomorph
perl6/doc
…/traps.pod6 :458:
say so <0>; # OUTPUT: «False␤»
perl6/doc
…/traps.pod6 :459:
say so <0e0>; # OUTPUT: «False␤»
perl6/doc
…/traps.pod6 :460:
say so <0.0>; # OUTPUT: «False␤»
perl6/doc
…/traps.pod6 :463:
L«prefix C<~> operator
perl6/doc
…/traps.pod6 :466:
say so ~<0>; # OUTPUT: «True␤»
perl6/doc
…/traps.pod6 :467:
say so <0>.Str; # OUTPUT: «True␤»
perl6/doc
…/traps.pod6 :468:
say so chars <0>; # OUTPUT: «True␤»
perl6/doc
…/traps.pod6 :486:
# OUTPUT: «az, ba, bb, bc␤»
perl6/doc
…/traps.pod6 :493:
#`{ OUTPUT: «
perl6/doc
…/traps.pod6 :501:
# OUTPUT: «r2, r3, s2, s3, t2, t3␤»
perl6/doc
…/traps.pod6 :508:
# OUTPUT: «az, ba, bb, bc␤»
perl6/doc
…/traps.pod6 :520:
# OUTPUT: «object␤object␤»
perl6/doc
…/traps.pod6 :522:
# OUTPUT: «topic␤True␤»
perl6/doc
…/traps.pod6 :530:
# OUTPUT: «object␤object␤»
perl6/doc
…/traps.pod6 :532:
# OUTPUT: «object␤False␤»
perl6/doc
…/traps.pod6 :536:
The fat arrow operator C«=>» will turn words on its left hand side to C<Str>
perl6/doc
…/traps.pod6 :544:
# OUTPUT: «{:V("oi‽"), :x(42)}␤»
perl6/doc
…/traps.pod6 :548:
=head2 C«<{$x}>» vs C«$($x)»: Implicit EVAL
perl6/doc
…/traps.pod6 :555:
say ‘I ♥ camelia’ ~~ / $($x.flip) / # OUTPUT: «「camelia」␤»
perl6/doc
…/traps.pod6 :563:
say ‘I ♥ camelia’ ~~ / <{$x.flip}> / # OUTPUT: «「camelia」␤»
perl6/doc
…/traps.pod6 :576:
say ‘I ♥ camelia’ ~~ / <{$x.flip}> / # OUTPUT: «「camelia」␤»
perl6/doc
…/traps.pod6 :588:
Therefore, try not to use C«<{}>» unless you really need EVAL.
perl6/doc
…/traps.pod6 :593:
C«<{}>» will only result in an exception being thrown, and should not
perl6/doc
…/traps.pod6 :630:
say f; # OUTPUT: «True␤»
perl6/doc
…/traps.pod6 :635:
say -1²; # OUTPUT: «-1␤»
perl6/doc
…/traps.pod6 :636:
say -1**2; # OUTPUT: «-1␤»
perl6/doc
…/traps.pod6 :646:
say (-1)²; # OUTPUT: «1␤»
perl6/doc
…/traps.pod6 :647:
say (-1)**2; # OUTPUT: «1␤»
perl6/doc
…/traps.pod6 :659:
# OUTPUT: «Int+{R1}␤»
perl6/doc
…/traps.pod6 :773:
say @b.elems # OUTPUT: «9999␤»
perl6/doc
…/traps.pod6 :778:
@b.push:
perl6/doc
…/traps.pod6 :789:
say @b.elems # OUTPUT: «999999␤»
perl6/doc
…/traps.pod6 :799:
See L«C<IO::Handle.close>
perl6/doc
…/traps.pod6 :806:
See L«C<IO::CatHandle.close>
perl6/doc
…/traps.pod6 :812:
L«C<CWD> attribute
perl6/doc
…/traps.pod6 :819:
.Str.say; # OUTPUT: «foo␤»
perl6/doc
…/traps.pod6 :820:
.relative.say; # OUTPUT: «foo␤»
perl6/doc
…/traps.pod6 :823:
.Str.say; # OUTPUT: «foo␤»
perl6/doc
…/traps.pod6 :824:
.relative.say # OUTPUT: «../home/camelia/foo␤»
perl6/doc
…/traps.pod6 :847:
L«C<IO::Handle>
perl6/doc
…/traps.pod6 :848:
L«C<Str>
perl6/doc
…/traps.pod6 :863:
On the other hand, L«C<Str.lines>
perl6/doc
…/traps.pod6 :878:
L«C<IO::Handle.lines>
perl6/doc
…/traps.pod6 :880:
L«C<Str.lines>
perl6/doc
…/traps.pod6 :884:
L«C<IO::Handle.lines>
perl6/doc
…/traps.pod6 :891:
output and then using L«C<Str.split>
perl6/doc
…/traps.pod6 :907:
# OUTPUT: «The spawned process exited unsuccessfully (exit code: 42)␤»
perl6/doc
…/traps.pod6 :916:
# OUTPUT: «still alive␤»
perl6/doc
…/traps.pod6 :924:
# OUTPUT: «still alive␤»
perl6/doc
…/traps.pod6 :946:
f1 "Hello", "there"; # OUTPUT: «Hello There␤»
perl6/doc
…/traps.pod6 :951:
f2 "Hello", "there"; # OUTPUT: «there Hello␤»
perl6/doc
…/traps.pod6 :957:
for 1..4 { say "$^one $^two $^three $^four"; } # OUTPUT: «2 4 3 1␤»
perl6/doc
…/traps.pod6 :960:
for 1..4 { say "$^a $^b $^c $^d"; } # OUTPUT: «1 2 3 4␤»
perl6/doc
…/traps.pod6 :975:
<a b c d>».say # OUTPUT: «d␤b␤c␤a␤»
perl6/doc
…/traps.pod6 :980:
say (<a b c d>, <x y z>).map: *.elems × -1 # OUTPUT: «(-4 -3)␤»
perl6/doc
…/traps.pod6 :981:
say (<a b c d>, <x y z>)».&(*.elems × -1) # OUTPUT: «((-1 -1 -1 -1) (-1 -1 -1))␤»
perl6/doc
…/traps.pod6 :982:
say (<a b c d>, <x y z>).deepmap: *.elems × -1 # OUTPUT: «((-1 -1 -1 -1) (-1 -1 -1))␤»
perl6/doc
…/traps.pod6 :1000:
say "Variable = $var"; # OUTPUT: «Variable = 1␤»
perl6/doc
…/traps.pod6 :1009:
say "Variable = $var"; # OUTPUT: «Variable = 10␤»
perl6/doc
…/traps.pod6 :1021:
say "Variable = $var"; # OUTPUT: «Variable = 1␤»
perl6/doc
…/traps.pod6 :1035:
$a.sayit; # OUTPUT: «hi␤»
perl6/doc
…/typesystem.pod6 :27:
# OUTPUT: «Any␤»
perl6/doc
…/typesystem.pod6 :31:
# OUTPUT: «((Any) (Mu))␤»
perl6/doc
…/typesystem.pod6 :46:
# OUTPUT: «True␤»
perl6/doc
…/typesystem.pod6 :70:
# OUTPUT: «undefined␤»
perl6/doc
…/typesystem.pod6 :99:
# OUTPUT: «oioioioioioioioioioi‽␤»
perl6/doc
…/typesystem.pod6 :109:
# OUTPUT: «124␤»
perl6/doc
…/typesystem.pod6 :111:
# OUTPUT: «False␤»
perl6/doc
…/typesystem.pod6 :121:
# OUTPUT: «C␤»
perl6/doc
…/typesystem.pod6 :123:
X«
perl6/doc
…/typesystem.pod6 :124:
X«Forward declarations» can be provided with a block containing only C<...>. The
perl6/doc
…/typesystem.pod6 :150:
L«infix:<but>
perl6/doc
…/typesystem.pod6 :161:
# OUTPUT: «oi‽␤[True True]␤»
perl6/doc
…/typesystem.pod6 :172:
# OUTPUT: «True␤»
perl6/doc
…/typesystem.pod6 :188:
# OUTPUT: «($!priv (C) False)␤»
perl6/doc
…/typesystem.pod6 :190:
X«
perl6/doc
…/typesystem.pod6 :215:
# OUTPUT: «B::Int␤»
perl6/doc
…/typesystem.pod6 :217:
X«
perl6/doc
…/typesystem.pod6 :227:
# OUTPUT: «X::Comp::AdHoc: Cannot have a multi candidate for 'm' when an only method is also in the package 'C'␤»
perl6/doc
…/typesystem.pod6 :250:
# OUTPUT: «C.new(attr => 42)␤
perl6/doc
…/typesystem.pod6 :259:
L«sub-signatures
perl6/doc
…/typesystem.pod6 :267:
# OUTPUT: «simsalabim called with parameters ⌈\(42, "answer")⌋␤»
perl6/doc
…/typesystem.pod6 :282:
say A.new.WHAT; # OUTPUT: «(A)␤»
perl6/doc
…/typesystem.pod6 :283:
say A.new."WHAT"() # OUTPUT: «ain't gonna happen␤»
perl6/doc
…/typesystem.pod6 :295:
# OUTPUT: «("\&packaged",).Seq␤»
perl6/doc
…/typesystem.pod6 :309:
say $a.i; # OUTPUT: «answer␤»
perl6/doc
…/typesystem.pod6 :323:
say ((1.0, "2", 3e0), [^4], '5')».elems; # OUTPUT: «(3, 4, 1)␤»
perl6/doc
…/typesystem.pod6 :324:
say ((1.0, "2", 3e0), [^4], '5')».Int # OUTPUT: «((1 2 3) [0 1 2 3] 5)␤»
perl6/doc
…/typesystem.pod6 :343:
say C.new(B.new).m(); # OUTPUT: «B::m has been called.␤»
perl6/doc
…/typesystem.pod6 :348:
X«C<FALLBACK>
perl6/doc
…/typesystem.pod6 :391:
# OUTPUT: «(Any, Mu)␤»
perl6/doc
…/typesystem.pod6 :400:
# OUTPUT: «"A::from-a"␤»
perl6/doc
…/typesystem.pod6 :402:
=head3 trait X«C<is rw>
perl6/doc
…/typesystem.pod6 :415:
dd $c; # OUTPUT: «Int $c = 42␤»
perl6/doc
…/typesystem.pod6 :432:
# OUTPUT: «Correct.new(attr => 42)␤»
perl6/doc
…/typesystem.pod6 :439:
# OUTPUT: «X::Attribute::Required => The attribute '$!attr' is required, but you did not provide a value for it.␤»
perl6/doc
…/typesystem.pod6 :456:
# OUTPUT: «i am hidden␤»
perl6/doc
…/typesystem.pod6 :471:
# OUTPUT: «i am hidden␤»
perl6/doc
…/typesystem.pod6 :490:
# OUTPUT: «B.new(a => A.new(foo => 42))␤»
perl6/doc
…/typesystem.pod6 :507:
# OUTPUT: «answer␤»
perl6/doc
…/typesystem.pod6 :517:
Versioning and authorship can be applied via adverbs X«C«:ver<>»
perl6/doc
…/typesystem.pod6 :524:
# OUTPUT: «[v4.2.3 me@here.local]␤»
perl6/doc
…/typesystem.pod6 :548:
# OUTPUT: «[A<57192848> B<57192880>]␤»
perl6/doc
…/typesystem.pod6 :557:
# OUTPUT: «X::Comp::AdHoc Method 'overload-this' must be implemented by A because it is required by roles: R.␤»
perl6/doc
…/typesystem.pod6 :567:
# OUTPUT: «((R) (Any) (Mu))␤»
perl6/doc
…/typesystem.pod6 :569:
# OUTPUT: «Perl6::Metamodel::ClassHOW␤»
perl6/doc
…/typesystem.pod6 :571:
# OUTPUT: «True␤»
perl6/doc
…/typesystem.pod6 :588:
# OUTPUT: «[True True]␤»
perl6/doc
…/typesystem.pod6 :602:
# OUTPUT: «C $c = C.new(a => "default")␤»
perl6/doc
…/typesystem.pod6 :618:
# OUTPUT: «X::AdHoc: Could not instantiate role 'R':␤Please provide a parameter to role R␤»
perl6/doc
…/typesystem.pod6 :659:
# OUTPUT: «[75kg 735.49875kN]␤»
perl6/doc
…/typesystem.pod6 :661:
# OUTPUT: «[Int+{SI-kilogram} Rat+{SI-Newton}]␤»
perl6/doc
…/typesystem.pod6 :666:
Versioning and authorship can be applied via adverbs X«C«:ver<>»
perl6/doc
…/typesystem.pod6 :673:
# OUTPUT: «[v4.2.3 me@here.local]␤»
perl6/doc
…/typesystem.pod6 :689:
say name1, ' ', name2; # OUTPUT: «name1 name2␤»
perl6/doc
…/typesystem.pod6 :690:
say name1.value, ' ', name2.value; # OUTPUT: «1 2␤»
perl6/doc
…/typesystem.pod6 :700:
say same(name1, name1); # OUTPUT: «True␤»
perl6/doc
…/typesystem.pod6 :701:
say same(name1, name2); # OUTPUT: «False␤»
perl6/doc
…/typesystem.pod6 :703:
say $a ~~ Names; # OUTPUT: «True␤»
perl6/doc
…/typesystem.pod6 :704:
say $a.^name; # OUTPUT: «Names␤»
perl6/doc
…/typesystem.pod6 :709:
dd Mass.enums; # OUTPUT: «{:g(1.0), :kg(1000.0), :mg(0.001)}␤»
perl6/doc
…/typesystem.pod6 :716:
dd Numbers.enums; # OUTPUT: «{:four(3), :one(0), :three(2), :two(1)}␤»
perl6/doc
…/typesystem.pod6 :720:
enum Numbers «:one(1) two three four»;
perl6/doc
…/typesystem.pod6 :721:
dd Numbers.enums; # OUTPUT: «{:four(4), :one(1), :three(3), :two(2)}␤»
perl6/doc
…/typesystem.pod6 :728:
say two; # OUTPUT: «two␤»
perl6/doc
…/typesystem.pod6 :729:
say one.^name; # OUTPUT: «␤»
perl6/doc
…/typesystem.pod6 :730:
say $e.^name; # OUTPUT: «Map␤»
perl6/doc
…/typesystem.pod6 :737:
# OUTPUT: «(E::two, E::one).Seq␤»
perl6/doc
…/typesystem.pod6 :748:
# OUTPUT: «True␤»
perl6/doc
…/typesystem.pod6 :761:
say Mass.enums, g.enums; # OUTPUT: «{g => 1, kg => 1000, mg => 0.001}{g => 1, kg => 1000, mg => 0.001}␤»
perl6/doc
…/typesystem.pod6 :768:
say g.key; # OUTPUT: «g␤»
perl6/doc
…/typesystem.pod6 :775:
say g.value; # OUTPUT: «1␤»
perl6/doc
…/typesystem.pod6 :787:
say g.pair; # OUTPUT: «g => 1␤»
perl6/doc
…/typesystem.pod6 :799:
say g.kv; # OUTPUT: «(g 1)␤»
perl6/doc
…/typesystem.pod6 :807:
A(72).say; # OUTPUT: «mon␤»
perl6/doc
…/typesystem.pod6 :808:
A(1000).say; # OUTPUT: «(A)␤»
perl6/doc
…/typesystem.pod6 :816:
Versioning and authorship can be applied via adverbs C«:ver<>» and C«:auth<>».
perl6/doc
…/typesystem.pod6 :823:
# OUTPUT: «[v4.2.3 me@here.local]␤»
perl6/doc
…/typesystem.pod6 :835:
Versioning and authorship can be applied via adverbs X«C«:ver<>»
perl6/doc
…/typesystem.pod6 :842:
# OUTPUT: «[v4.2.3 me@here.local]␤»
perl6/doc
…/typesystem.pod6 :854:
# OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $i; expected Positive but got Int (-42)␤»
perl6/doc
…/typesystem.pod6 :865:
# OUTPUT: «[A C]␤»
perl6/doc
…/unicode.pod6 :68:
say "\c[482]"; # OUTPUT: «Ǣ␤»
perl6/doc
…/unicode.pod6 :69:
say "\x1E2"; # OUTPUT: «Ǣ␤»
perl6/doc
…/unicode.pod6 :74:
say "\c[PENGUIN]"; # OUTPUT: «🐧␤»
perl6/doc
…/unicode.pod6 :75:
say "\c[BELL]"; # OUTPUT: «🔔␤» (U+1F514 BELL)
perl6/doc
…/unicode.pod6 :80:
say "\c[latin capital letter ae with macron]"; # OUTPUT: «Ǣ␤»
perl6/doc
…/unicode.pod6 :81:
say "\c[latin capital letter E]"; # OUTPUT: «E␤» (U+0045)
perl6/doc
…/unicode.pod6 :86:
say "\c[482,PENGUIN]"; # OUTPUT: «Ǣ🐧␤»
perl6/doc
…/unicode.pod6 :92:
say "DIGIT ONE".parse-names; # OUTPUT: «1␤»
perl6/doc
…/unicode.pod6 :93:
say parse-names("DIGIT ONE"); # OUTPUT: «1␤»
perl6/doc
…/unicode.pod6 :108:
say "\c[LATIN CAPITAL LETTER GHA]"; # OUTPUT: «Ƣ␤»
perl6/doc
…/unicode.pod6 :109:
say "Ƣ".uniname; # OUTPUT: «LATIN CAPITAL LETTER OI␤»
perl6/doc
…/unicode.pod6 :112:
# OUTPUT: «PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET␤»
perl6/doc
…/unicode.pod6 :116:
say "\c[ZWJ]".uniname; # OUTPUT: «ZERO WIDTH JOINER␤»
perl6/doc
…/unicode.pod6 :117:
say "\c[NBSP]".uniname; # OUTPUT: «NO-BREAK SPACE␤»
perl6/doc
…/unicode.pod6 :124:
say "\c[LATIN CAPITAL LETTER E WITH VERTICAL LINE BELOW AND ACUTE]"; # OUTPUT: «É̩␤»
perl6/doc
…/unicode.pod6 :125:
say "\c[LATIN CAPITAL LETTER E WITH VERTICAL LINE BELOW AND ACUTE]".ords; # OUTPUT: «(201 809)␤»
perl6/doc
…/unicode.pod6 :136:
say "\c[woman gesturing OK]"; # OUTPUT: «🙆‍♀️␤»
perl6/doc
…/unicode.pod6 :137:
say "\c[family: man woman girl boy]"; # OUTPUT: «👨‍👩‍👧‍👦␤»
perl6/doc
…/unicode_entry.pod6 :25:
So, for example, to input C<»+«> you could type
perl6/doc
…/unicode_entry.pod6 :223:
« U+00AB <<
perl6/doc
…/unicode_entry.pod6 :229:
say (1, 2) »+« (3, 4); # OUTPUT: «(4 6)␤» - element-wise add
perl6/doc
…/unicode_entry.pod6 :231:
say «moo»; # OUTPUT: «moo␤»
perl6/doc
…/unicode_entry.pod6 :234:
say «$baa $baa ber».perl; # OUTPUT: «("foo", "bar", "foo", "bar", "ber")␤»
perl6/doc
…/unicode_texas.pod6 :31:
say $var + 2; # OUTPUT: «21␤»
perl6/doc
…/unicode_texas.pod6 :40:
say $var; # OUTPUT: «14.1␤»
perl6/doc
…/unicode_texas.pod6 :53:
X<
perl6/doc
…/unicode_texas.pod6 :57:
«
perl6/doc
…/unicode_texas.pod6 :58:
»
perl6/doc
…/unicode_texas.pod6 :147:
X<
perl6/doc
…/unicode_texas.pod6 :152:
«=«
perl6/doc
…/unicode_texas.pod6 :153:
«
perl6/doc
…/unicode_texas.pod6 :154:
»=«
perl6/doc
…/variables.pod6 :66:
# OUTPUT: «round␤»
perl6/doc
…/variables.pod6 :70:
# OUTPUT: «X::OutOfRange: Hash key out of range. Is: cherry, should be in (oranges bananas)»
perl6/doc
…/variables.pod6 :94:
say $foo.perl; # OUTPUT: «5␤»
perl6/doc
…/variables.pod6 :97:
say @bar.^name; # OUTPUT: «Array␤»
perl6/doc
…/variables.pod6 :98:
say @bar.perl; # OUTPUT: «[7, 9]␤»
perl6/doc
…/variables.pod6 :101:
say $baz.^name; # OUTPUT: «List␤»
perl6/doc
…/variables.pod6 :102:
say $baz.perl; # OUTPUT: «$(11, 13)␤»
perl6/doc
…/variables.pod6 :113:
say @array.perl; # OUTPUT: «[42, "str"]␤» (an Array)
perl6/doc
…/variables.pod6 :114:
say $num.perl; # OUTPUT: «42␤» (a Num)
perl6/doc
…/variables.pod6 :122:
say @array.perl; # OUTPUT: «[42, "str"]␤» (an Array)
perl6/doc
…/variables.pod6 :123:
say $num.perl; # OUTPUT: «42␤» (a Num)
perl6/doc
…/variables.pod6 :127:
say @foo.perl; # OUTPUT: «[(42, "str"),]␤» (an Array)
perl6/doc
…/variables.pod6 :128:
say $bar.perl; # OUTPUT: «$(42, "str")␤» (a List)#
perl6/doc
…/variables.pod6 :136:
say @array.perl; # OUTPUT: «[42, "str"]␤»
perl6/doc
…/variables.pod6 :137:
say $num.perl; # OUTPUT: «42␤»
perl6/doc
…/variables.pod6 :248:
say foo; # OUTPUT: «foo␤»
perl6/doc
…/variables.pod6 :252:
say foo; # OUTPUT: «bar␤»
perl6/doc
…/variables.pod6 :320:
SaySomething.b; # OUTPUT: «a␤»
perl6/doc
…/variables.pod6 :335:
# OUTPUT: «61␤»
perl6/doc
…/variables.pod6 :371:
# OUTPUT: «-1␤»
perl6/doc
…/variables.pod6 :433:
say "Hello $amazing-variable!"; # OUTPUT: «Hello World!␤»
perl6/doc
…/variables.pod6 :466:
say $foo; # OUTPUT: «"bar"␤»
perl6/doc
…/variables.pod6 :484:
outer-location; # OUTPUT: «outside␤»
perl6/doc
…/variables.pod6 :491:
in-building; # OUTPUT: «inside␤»
perl6/doc
…/variables.pod6 :493:
outer-location; # OUTPUT: «outside␤»
perl6/doc
…/variables.pod6 :505:
new-location; # OUTPUT: «outside␤»
perl6/doc
…/variables.pod6 :532:
This can be used in conjunction with X«destructuring assignment». Any
perl6/doc
…/variables.pod6 :540:
# OUTPUT: «["a", "b", Int]␤»
perl6/doc
…/variables.pod6 :549:
# OUTPUT: «1␤»
perl6/doc
…/variables.pod6 :555:
# OUTPUT: «["b", {:th(1)}]␤»
perl6/doc
…/variables.pod6 :637:
dd @a; # OUTPUT: «Array @a = [:k1(3), :k2(3), :k3(3)]␤»
perl6/doc
…/variables.pod6 :646:
# OUTPUT: «1␤2␤3␤4␤4␤3␤5␤»
perl6/doc
…/variables.pod6 :647:
# OUTPUT: «2␤1␤3␤4␤5␤»
perl6/doc
…/variables.pod6 :656:
# OUTPUT: «one-a two-b three-c␤»
perl6/doc
…/variables.pod6 :670:
# OUTPUT: «1␤0␤2␤1␤3␤2␤4␤3␤5␤4␤»
perl6/doc
…/variables.pod6 :694:
# OUTPUT: «one␤two␤three␤»
perl6/doc
…/variables.pod6 :717:
# OUTPUT: «[0]
perl6/doc
…/variables.pod6 :734:
# OUTPUT: «[0]
perl6/doc
…/variables.pod6 :751:
# OUTPUT: «{0 => 0}
perl6/doc
…/variables.pod6 :766:
# OUTPUT: «{0 => 0}
perl6/doc
…/variables.pod6 :787:
say 42.is-answer; # OUTPUT: «True␤»
perl6/doc
…/variables.pod6 :815:
# OUTPUT: «<g>
perl6/doc
…/variables.pod6 :863:
# OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $x; expected Int but got Str ("a string")␤»
perl6/doc
…/variables.pod6 :869:
say $x.^name; # OUTPUT: «Int␤»
perl6/doc
…/variables.pod6 :870:
say $x.defined; # OUTPUT: «False␤»
perl6/doc
…/variables.pod6 :883:
say $product; # OUTPUT: «1␤»
perl6/doc
…/variables.pod6 :885:
say $product; # OUTPUT: «5␤»
perl6/doc
…/variables.pod6 :887:
say $product; # OUTPUT: «1␤»
perl6/doc
…/variables.pod6 :898:
# OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Variable definition of type Int:D (implicit :D by pragma) requires an initializer ...
perl6/doc
…/variables.pod6 :957:
# OUTPUT: «Looking for strings with non-alphabetic characters...
perl6/doc
…/variables.pod6 :968:
say $/.Str; # OUTPUT: «abc␤»
perl6/doc
…/variables.pod6 :978:
# OUTPUT: «「<p>some text</p>」
perl6/doc
…/variables.pod6 :991:
=head4 X«Positional Attributes
perl6/doc
…/variables.pod6 :997:
say $/[0]; # OUTPUT: «「bbbbb」␤»
perl6/doc
…/variables.pod6 :998:
say $/[1]; # OUTPUT: «「dddddeff」␤»
perl6/doc
…/variables.pod6 :1002:
say $0; # OUTPUT: «「bbbbb」␤»
perl6/doc
…/variables.pod6 :1003:
say $1; # OUTPUT: «「dddddeff」␤»
perl6/doc
…/variables.pod6 :1008:
say @().join; # OUTPUT: «bbbbbdddddeff␤»
perl6/doc
…/variables.pod6 :1010:
=head4 X«Named Attributes
perl6/doc
…/variables.pod6 :1016:
say $/<punctuation>; # OUTPUT: «「....」␤»
perl6/doc
…/variables.pod6 :1017:
say $/<final-word>; # OUTPUT: «「see?」␤»
perl6/doc
…/variables.pod6 :1019:
These can also be accessed by the shortcut C«$<named>».
perl6/doc
…/variables.pod6 :1021:
say $<punctuation>; # OUTPUT: «「....」␤»
perl6/doc
…/variables.pod6 :1022:
say $<final-word>; # OUTPUT: «「see?」␤»
perl6/doc
…/variables.pod6 :1027:
say %().join; # OUTPUT: «"punctuation ....final-word see?"␤»
perl6/doc
…/variables.pod6 :1151:
perl6/doc
…/variables.pod6 :1152:
perl6/doc
…/variables.pod6 :1158:
$*TMPDIR
perl6/doc
…/Any.pod6 :44:
say so 2 == <1 2 3>.any; # OUTPUT: «True␤»
perl6/doc
…/Any.pod6 :45:
say so 5 == <1 2 3>.any; # OUTPUT: «False␤»
perl6/doc
…/Any.pod6 :56:
say so 1 < <2 3 4>.all; # OUTPUT: «True␤»
perl6/doc
…/Any.pod6 :57:
say so 3 < <2 3 4>.all; # OUTPUT: «False␤»
perl6/doc
…/Any.pod6 :68:
say so 1 == (1, 2, 3).one; # OUTPUT: «True␤»
perl6/doc
…/Any.pod6 :69:
say so 1 == (1, 2, 1).one; # OUTPUT: «False␤»
perl6/doc
…/Any.pod6 :80:
say so 1 == (1, 2, 3).none; # OUTPUT: «False␤»
perl6/doc
…/Any.pod6 :81:
say so 4 == (1, 2, 3).none; # OUTPUT: «True␤»
perl6/doc
…/Any.pod6 :91:
say 42.list.^name; # OUTPUT: «List␤»
perl6/doc
…/Any.pod6 :92:
say 42.list.elems; # OUTPUT: «1␤»
perl6/doc
…/Any.pod6 :108:
dd %h; # «Hash %h = {:a($[1])}␤» # please note the Array
perl6/doc
…/Any.pod6 :117:
Returns a L«C<Seq>
perl6/doc
…/Any.pod6 :124:
say <hello world!>.reverse; # OUTPUT: «(world! hello)␤»
perl6/doc
…/Any.pod6 :125:
say reverse ^10; # OUTPUT: «(9 8 7 6 5 4 3 2 1 0)␤»
perl6/doc
…/Any.pod6 :140:
say <b c a>.sort; # OUTPUT: «(a b c)␤»
perl6/doc
…/Any.pod6 :141:
say 'bca'.comb.sort.join; # OUTPUT: «abc␤»
perl6/doc
…/Any.pod6 :142:
say 'bca'.comb.sort({$^b cmp $^a}).join; # OUTPUT: «cba␤»
perl6/doc
…/Any.pod6 :143:
say '231'.comb.sort(&infix:«<=>»).join; # OUTPUT: «123␤»
perl6/doc
…/Any.pod6 :172:
# OUTPUT: «[[2, 3, 4], [[5, 6], 7, 8]]␤»
perl6/doc
…/Any.pod6 :185:
# OUTPUT: «(a b C D E f g)␤»
perl6/doc
…/Any.pod6 :187:
# OUTPUT: «((d E) F)␤»
perl6/doc
…/Any.pod6 :200:
# OUTPUT: «(4, 4, 8)␤»
perl6/doc
…/Any.pod6 :203:
# OUTPUT: «((3 4) (5 3))␤»
perl6/doc
…/Any.pod6 :210:
# OUTPUT: «(() () 7)␤»
perl6/doc
…/Any.pod6 :212:
# OUTPUT: «(7)␤»
perl6/doc
…/Any.pod6 :226:
say ((1, 2), (3), %(:42a)); # OUTPUT: «((1 2) 3 {a => 42})␤»
perl6/doc
…/Any.pod6 :227:
say ((1, 2), (3), %(:42a)).flat; # OUTPUT: «(1 2 3 a => 42)␤»
perl6/doc
…/Any.pod6 :232:
L«C<.List>
perl6/doc
…/Any.pod6 :235:
say [[1, 2, 3], [(4, 5), 6, 7]] .flat; # OUTPUT: «([1 2 3] [(4 5) 6 7])␤»
perl6/doc
…/Any.pod6 :236:
say [[1, 2, 3], [(4, 5), 6, 7]]».List.flat; # OUTPUT: «(1 2 3 4 5 6 7)␤»
perl6/doc
…/Any.pod6 :238:
For more fine-tuned options, see L«C<deepmap>
perl6/doc
…/Any.pod6 :239:
L«C<duckmap>
perl6/doc
…/Any.pod6 :251:
say (1..10).eager; # OUTPUT: «(1 2 3 4 5 6 7 8 9 10)␤»
perl6/doc
…/Any.pod6 :262:
say 42.elems; # OUTPUT: «1␤»
perl6/doc
…/Any.pod6 :263:
say <a b c>.elems; # OUTPUT: «3␤»
perl6/doc
…/Any.pod6 :271:
say 6.end; # OUTPUT: «0␤»
perl6/doc
…/Any.pod6 :272:
say <a b c>.end; # OUTPUT: «2␤»
perl6/doc
…/Any.pod6 :287:
say (a => 1, 'b', 'c').pairup.perl; # OUTPUT: «(:a(1), :b("c")).Seq␤»
perl6/doc
…/Any.pod6 :312:
say item([1,2,3]).perl; # OUTPUT: «$[1, 2, 3]␤»
perl6/doc
…/Any.pod6 :313:
say item({ apple => 10 }).perl; # OUTPUT: «${:apple(10)}␤»
perl6/doc
…/Any.pod6 :314:
say item("abc").perl; # OUTPUT: «"abc"␤»
perl6/doc
…/Any.pod6 :318:
say $[1,2,3].perl; # OUTPUT: «$[1, 2, 3]␤»
perl6/doc
…/Any.pod6 :319:
say $("abc").perl; # OUTPUT: «"abc"␤»
perl6/doc
…/Any.pod6 :444:
say (1,7,3).min(); # OUTPUT:«1␤»
perl6/doc
…/Any.pod6 :445:
say (1,7,3).min({1/$_}); # OUTPUT:«7␤»
perl6/doc
…/Any.pod6 :460:
say (1,7,3).max(); # OUTPUT:«7␤»
perl6/doc
…/Any.pod6 :461:
say (1,7,3).max({1/$_}); # OUTPUT:«1␤»
perl6/doc
…/Any.pod6 :477:
say (1,7,3).minmax(); # OUTPUT:«1..7␤»
perl6/doc
…/Any.pod6 :478:
say (1,7,3).minmax({-$_}); # OUTPUT:«7..1␤»
perl6/doc
…/Any.pod6 :486:
Calls L«C<.pairs>
perl6/doc
…/Any.pod6 :488:
L«C<cmp> operator
perl6/doc
…/Any.pod6 :490:
<a b c a b c>.minpairs.perl.put; # OUTPUT: «(0 => "a", 3 => "a").Seq␤»
perl6/doc
…/Any.pod6 :491:
%(:42a, :75b).minpairs.perl.put; # OUTPUT: «(:a(42),).Seq␤»
perl6/doc
…/Any.pod6 :499:
Calls L«C<.pairs>
perl6/doc
…/Any.pod6 :501:
L«C<cmp> operator
perl6/doc
…/Any.pod6 :503:
<a b c a b c>.maxpairs.perl.put; # OUTPUT: «(2 => "c", 5 => "c").Seq␤»
perl6/doc
…/Any.pod6 :504:
%(:42a, :75b).maxpairs.perl.put; # OUTPUT: «(:b(75),).Seq␤»
perl6/doc
…/Any.pod6 :515:
say Any.keys; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :524:
L«C<List.flatmap>
perl6/doc
…/Any.pod6 :526:
say Any.flatmap({.reverse}); # OUTPUT: «((Any))␤»
perl6/doc
…/Any.pod6 :536:
L«C<List.roll>
perl6/doc
…/Any.pod6 :538:
say Any.roll; # OUTPUT: «(Any)␤»
perl6/doc
…/Any.pod6 :539:
say Any.roll(5); # OUTPUT: «((Any) (Any) (Any) (Any) (Any))␤»
perl6/doc
…/Any.pod6 :549:
L«C<List.pick>
perl6/doc
…/Any.pod6 :551:
say Any.pick; # OUTPUT: «(Any)␤»
perl6/doc
…/Any.pod6 :552:
say Any.pick(5); # OUTPUT: «((Any))␤»
perl6/doc
…/Any.pod6 :562:
L«C<Seq.skip>
perl6/doc
…/Any.pod6 :564:
say Any.skip; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :565:
say Any.skip(5); # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :566:
say Any.skip(-1); # OUTPUT: «((Any))␤»
perl6/doc
…/Any.pod6 :576:
L«C<Array.prepend>
perl6/doc
…/Any.pod6 :579:
say $a.prepend; # OUTPUT: «[]␤»
perl6/doc
…/Any.pod6 :580:
say $a; # OUTPUT: «[]␤»
perl6/doc
…/Any.pod6 :582:
say $b.prepend(1,2,3); # OUTPUT: «[1 2 3]␤»
perl6/doc
…/Any.pod6 :592:
L«C<Array.unshift>
perl6/doc
…/Any.pod6 :595:
say $a.unshift; # OUTPUT: «[]␤»
perl6/doc
…/Any.pod6 :596:
say $a; # OUTPUT: «[]␤»
perl6/doc
…/Any.pod6 :598:
say $b.unshift([1,2,3]); # OUTPUT: «[[1 2 3]]␤»
perl6/doc
…/Any.pod6 :607:
L«C<List.first>
perl6/doc
…/Any.pod6 :609:
say Any.first; # OUTPUT: «(Any)␤»
perl6/doc
…/Any.pod6 :618:
L«C<List.unique>
perl6/doc
…/Any.pod6 :620:
say Any.unique; # OUTPUT: «((Any))␤»
perl6/doc
…/Any.pod6 :629:
L«C<List.repeated>
perl6/doc
…/Any.pod6 :631:
say Any.repeated; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :640:
L«C<List.squish>
perl6/doc
…/Any.pod6 :642:
say Any.squish; # OUTPUT: «((Any))␤»
perl6/doc
…/Any.pod6 :659:
L«C<List.permutations>
perl6/doc
…/Any.pod6 :661:
say Any.permutations; # OUTPUT: «(((Any)))␤»
perl6/doc
…/Any.pod6 :670:
L«C<List.categorize>
perl6/doc
…/Any.pod6 :672:
say Any.categorize({ $_ }); # OUTPUT: «{(Any) => [(Any)]}␤»
perl6/doc
…/Any.pod6 :681:
L«C<List.classify>
perl6/doc
…/Any.pod6 :683:
say Any.classify({ $_ }); # OUTPUT: «{(Any) => [(Any)]}␤»
perl6/doc
…/Any.pod6 :701:
say Any.pairs; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :711:
say Any.antipairs; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :721:
say Any.kv; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :731:
say Any.tree; # OUTPUT: «Any␤»
perl6/doc
…/Any.pod6 :740:
L«C<IO::Handle.nl-out>
perl6/doc
…/Any.pod6 :743:
say Any.nl-out; # OUTPUT: «␤␤»
perl6/doc
…/Any.pod6 :753:
say Any.invert; # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :762:
L«C<List.combinations>
perl6/doc
…/Any.pod6 :764:
say Any.combinations; # OUTPUT: «(() ((Any)))␤»
perl6/doc
…/Any.pod6 :773:
L«C<iterator>
perl6/doc
…/Any.pod6 :776:
say $it.pull-one; # OUTPUT: «(Any)␤»
perl6/doc
…/Any.pod6 :777:
say $it.pull-one; # OUTPUT: «IterationEnd␤»
perl6/doc
…/Any.pod6 :786:
L«C<List.grep>
perl6/doc
…/Any.pod6 :791:
say $a.grep({ True }); # OUTPUT: «((Any))␤»
perl6/doc
…/Any.pod6 :792:
say $a.grep({ $_ }); # OUTPUT: «()␤»
perl6/doc
…/Any.pod6 :801:
L«C<Array.append>
perl6/doc
…/Any.pod6 :804:
say $a.append; # OUTPUT: «[]␤»
perl6/doc
…/Any.pod6 :806:
say $b.append((1,2,3)); # OUTPUT: «[1 2 3]␤»
perl6/doc
…/Array.pod6 :33:
# OUTPUT: «X::Cannot::Empty: Cannot pop from an empty Array␤»
perl6/doc
…/Array.pod6 :49:
say @foo; # OUTPUT: «[a b c d]␤»
perl6/doc
…/Array.pod6 :57:
say @a.elems; # OUTPUT: «4␤»
perl6/doc
…/Array.pod6 :58:
say @a[3].join; # OUTPUT: «def␤»
perl6/doc
…/Array.pod6 :67:
say @a.elems; # OUTPUT: «3␤»
perl6/doc
…/Array.pod6 :94:
say @a.elems; # OUTPUT: «6␤»
perl6/doc
…/Array.pod6 :95:
say @a; # OUTPUT: «[a b c d e f]␤»
perl6/doc
…/Array.pod6 :108:
say [<foo bar ber>] .elems; # OUTPUT: «3␤»
perl6/doc
…/Array.pod6 :109:
say (my @a[42;3;70]).elems; # OUTPUT: «42␤»
perl6/doc
…/Array.pod6 :112:
say $!.^name; # OUTPUT: «X::Cannot::Lazy␤»
perl6/doc
…/Array.pod6 :125:
say @b; # OUTPUT: «[a 42 c]␤»
perl6/doc
…/Array.pod6 :126:
say @a; # OUTPUT: «[a b c 72]␤»
perl6/doc
…/Array.pod6 :137:
say @b[^3]; # OUTPUT: «(1 0.0216426755282736 0.567660896142156)␤»
perl6/doc
…/Array.pod6 :138:
say @a[^3]; # OUTPUT: «(1 0.0216426755282736 0.567660896142156)␤»
perl6/doc
…/Array.pod6 :152:
say @foo.shift; # OUTPUT: «a␤»
perl6/doc
…/Array.pod6 :153:
say @foo.shift; # OUTPUT: «b␤»
perl6/doc
…/Array.pod6 :156:
# OUTPUT: «X::Cannot::Empty: Cannot shift from an empty Array␤»
perl6/doc
…/Array.pod6 :172:
say @foo; # OUTPUT: «[(1 3 5 7 9 11) a b c]␤»
perl6/doc
…/Array.pod6 :197:
say @foo; # OUTPUT: «[1 3 5 7 9 11 a b c]␤»
perl6/doc
…/Array.pod6 :227:
say @foo.splice(2, 3, <M N O P>); # OUTPUT: «[c d e]␤»
perl6/doc
…/Array.pod6 :228:
say @foo; # OUTPUT: «[a b M N O P f g]␤»
perl6/doc
…/Array.pod6 :241:
say @foo.shape; # OUTPUT: «(2 3)␤»
perl6/doc
…/Array.pod6 :243:
say @bar.shape; # OUTPUT: «(*)␤»
perl6/doc
…/Array.pod6 :259:
say @a1.default; # OUTPUT: «(Any)␤»
perl6/doc
…/Array.pod6 :260:
say @a1[4]; # OUTPUT: «(Any)␤»
perl6/doc
…/Array.pod6 :263:
say @a2.default; # OUTPUT: «17␤»
perl6/doc
…/Array.pod6 :264:
say @a2[4]; # OUTPUT: «17␤»
perl6/doc
…/Array.pod6 :266:
say @a2[1]; # OUTPUT: «17␤»
perl6/doc
…/Array.pod6 :279:
say @a1.of; # OUTPUT: «(Mu)␤»
perl6/doc
…/Array.pod6 :282:
say @a2.of; # OUTPUT: «(Int)␤»
perl6/doc
…/Array.pod6 :285:
# OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to @a2; expected Int but got Str ("d")␤»
perl6/doc
…/Array.pod6 :297:
say @a.dynamic; # OUTPUT: «False␤»
perl6/doc
…/Array.pod6 :300:
say @b.dynamic; # OUTPUT: «True␤»
perl6/doc
…/Array.pod6 :305:
say @*b.dynamic; # OUTPUT: «True␤»
perl6/doc
…/Array.pod6 :311:
say $s.dynamic; # OUTPUT: «False␤» (wrong, don't do this)
perl6/doc
…/Array.pod6 :312:
say $s.VAR.dynamic; # OUTPUT: «True␤» (correct approach)
perl6/doc
…/Associative.pod6 :10:
L«postcircumfix:<{ }>
perl6/doc
…/Attribute.pod6 :22:
say $a.name; # OUTPUT: «@!things␤»
perl6/doc
…/Attribute.pod6 :23:
say $a.package; # OUTPUT: «(Useless)␤»
perl6/doc
…/Attribute.pod6 :24:
say $a.has_accessor; # OUTPUT: «False␤»
perl6/doc
…/Attribute.pod6 :31:
say $a.get_value($instance); # OUTPUT: «[1 2 3]␤»
perl6/doc
…/Attribute.pod6 :47:
# OUTPUT: «C.new(a => 666)␤C.new(a => 42)␤»
perl6/doc
…/Attribute.pod6 :59:
# OUTPUT: «X::Attribute::Required: The attribute '$!a' is required, but you did not provide a value for it.␤»
perl6/doc
…/Attribute.pod6 :84:
say $a.name; # OUTPUT: «@!bar␤»
perl6/doc
…/Attribute.pod6 :98:
say $a.package; # OUTPUT: «(Boo)␤»
perl6/doc
…/Attribute.pod6 :114:
say $private.has_accessor; # OUTPUT: «False␤»
perl6/doc
…/Attribute.pod6 :115:
say $public.has_accessor; # OUTPUT: «True␤»
perl6/doc
…/Attribute.pod6 :132:
say $addr.readonly; # OUTPUT: «True␤»
perl6/doc
…/Attribute.pod6 :133:
say $new-books.readonly; # OUTPUT: «False␤»
perl6/doc
…/Attribute.pod6 :150:
# OUTPUT: «(Positional[Int])
perl6/doc
…/Attribute.pod6 :166:
say $private.get_value(Violated.new); # OUTPUT: «5␤»
perl6/doc
…/Attribute.pod6 :185:
$a.speak; # OUTPUT: «5␤»
perl6/doc
…/Attribute.pod6 :187:
$a.speak; # OUTPUT: «42␤»
perl6/doc
…/Attribute.pod6 :207:
# OUTPUT: «X::Attribute::Required: The attribute '$!bar' is required, but you did not provide a value for it.␤»
perl6/doc
…/Attribute.pod6 :231:
# OUTPUT: «X::Assignment::RO: Cannot modify an immutable Any␤»
perl6/doc
…/Frame.pod6 :97:
say $btf.is-setting; # OUTPUT: «True␤»
perl6/doc
…/Bag.pod6 :26:
say $breakfast.elems; # OUTPUT: «3␤»
perl6/doc
…/Bag.pod6 :27:
say $breakfast.keys.sort; # OUTPUT: «bacon eggs spam␤»
perl6/doc
…/Bag.pod6 :29:
say $breakfast.total; # OUTPUT: «6␤»
perl6/doc
…/Bag.pod6 :30:
say $breakfast.kxxv.sort; # OUTPUT: «bacon eggs spam spam spam spam␤»
perl6/doc
…/Bag.pod6 :39:
say $breakfast<bacon>; # OUTPUT: «1␤»
perl6/doc
…/Bag.pod6 :40:
say $breakfast<spam>; # OUTPUT: «4␤»
perl6/doc
…/Bag.pod6 :41:
say $breakfast<sausage>; # OUTPUT: «0␤»
perl6/doc
…/Bag.pod6 :50:
say $n.keys.perl; # OUTPUT: «(:c(2), :b(1), :a(0)).Seq␤»
perl6/doc
…/Bag.pod6 :51:
say $n.keys.map(&WHAT); # OUTPUT: «((Pair) (Pair) (Pair))␤»
perl6/doc
…/Bag.pod6 :52:
say $n.values.perl; # OUTPUT: «(2, 1, 1).Seq␤»
perl6/doc
…/Bag.pod6 :62:
say $n.keys.perl; # OUTPUT: «("b", "c").Seq␤»
perl6/doc
…/Bag.pod6 :63:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Str))␤»
perl6/doc
…/Bag.pod6 :64:
say $n.values.perl; # OUTPUT: «(1, 4).Seq␤»
perl6/doc
…/Bag.pod6 :71:
say (1..5) (+) 4; # OUTPUT: «bag(1, 2, 3, 4(2), 5)␤»
perl6/doc
…/Bag.pod6 :82:
say $a (<) $b; # OUTPUT: «False␤»
perl6/doc
…/Bag.pod6 :83:
say $a (<+) $b; # OUTPUT: «False␤»
perl6/doc
…/Bag.pod6 :84:
say $a (^) $b; # OUTPUT: «bag(3(2), 2)␤»
perl6/doc
…/Bag.pod6 :85:
say $a (+) $b; # OUTPUT: «bag(2(3), 4(2), 3(2))␤»
perl6/doc
…/Bag.pod6 :88:
say $a ⊂ $b; # OUTPUT: «False␤»
perl6/doc
…/Bag.pod6 :89:
say $a ≼ $b; # OUTPUT: «False␤»
perl6/doc
…/Bag.pod6 :90:
say $a ⊖ $b; # OUTPUT: «bag(3(2), 2)␤»
perl6/doc
…/Bag.pod6 :91:
say $a ⊎ $b; # OUTPUT: «bag(2(3), 4(2), 3(2))␤»
perl6/doc
…/BagHash.pod6 :23:
say $breakfast.elems; # OUTPUT: «3␤»
perl6/doc
…/BagHash.pod6 :24:
say $breakfast.keys.sort; # OUTPUT: «bacon eggs spam␤»
perl6/doc
…/BagHash.pod6 :26:
say $breakfast.total; # OUTPUT: «6␤»
perl6/doc
…/BagHash.pod6 :27:
say $breakfast.kxxv.sort; # OUTPUT: «bacon eggs spam spam spam spam␤»
perl6/doc
…/BagHash.pod6 :39:
say $breakfast<bacon>; # OUTPUT: «1␤»
perl6/doc
…/BagHash.pod6 :40:
say $breakfast<spam>; # OUTPUT: «4␤»
perl6/doc
…/BagHash.pod6 :41:
say $breakfast<sausage>; # OUTPUT: «0␤»
perl6/doc
…/BagHash.pod6 :45:
say $breakfast.kxxv.sort; # OUTPUT: «eggs sausage sausage spam spam spam spam␤»
perl6/doc
…/BagHash.pod6 :54:
say $n.keys.perl; # OUTPUT: «(:c(2), :b(1), :a(0)).Seq␤»
perl6/doc
…/BagHash.pod6 :55:
say $n.keys.map(&WHAT); # OUTPUT: «((Pair) (Pair) (Pair))␤»
perl6/doc
…/BagHash.pod6 :56:
say $n.values.perl; # OUTPUT: «(2, 1, 1).Seq␤»
perl6/doc
…/BagHash.pod6 :66:
say $n.keys.perl; # OUTPUT: «("b", "c").Seq␤»
perl6/doc
…/BagHash.pod6 :67:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Str))␤»
perl6/doc
…/BagHash.pod6 :68:
say $n.values.perl; # OUTPUT: «(1, 4).Seq␤»
perl6/doc
…/BagHash.pod6 :79:
say $a (<) $b; # OUTPUT: «False␤»
perl6/doc
…/BagHash.pod6 :80:
say $a (<+) $b; # OUTPUT: «False␤»
perl6/doc
…/BagHash.pod6 :81:
say $a (^) $b; # OUTPUT: «bag(3(2), 2)␤»
perl6/doc
…/BagHash.pod6 :82:
say $a (+) $b; # OUTPUT: «bag(2(3), 4(2), 3(2))␤»
perl6/doc
…/BagHash.pod6 :85:
say $a ⊂ $b; # OUTPUT: «False␤»
perl6/doc
…/BagHash.pod6 :86:
say $a ≼ $b; # OUTPUT: «False␤»
perl6/doc
…/BagHash.pod6 :87:
say $a ⊖ $b; # OUTPUT: «bag(3(2), 2)␤»
perl6/doc
…/BagHash.pod6 :88:
say $a ⊎ $b; # OUTPUT: «bag(2(3), 4(2), 3(2))␤»
perl6/doc
…/Baggy.pod6 :20:
Constructs a Baggy objects from a list of L«C<Pair> objects
perl6/doc
…/Baggy.pod6 :24:
# OUTPUT: «mix(butter(0.22), sugar(0.12))␤»
perl6/doc
…/Baggy.pod6 :48:
say $cars.grab; # OUTPUT: «Ford␤»
perl6/doc
…/Baggy.pod6 :49:
say $cars.grab(2); # OUTPUT: «(Rover Rover)␤»
perl6/doc
…/Baggy.pod6 :50:
say $cars.grab(*); # OUTPUT: «(Rover Ford)␤»
perl6/doc
…/Baggy.pod6 :55:
# OUTPUT: «X::Immutable: Cannot call 'grab' on an immutable 'Bag'␤»
perl6/doc
…/Baggy.pod6 :76:
say $breakfast.grabpairs; # OUTPUT: «bacon => 3␤»
perl6/doc
…/Baggy.pod6 :77:
say $breakfast; # OUTPUT: «BagHash.new(eggs(2))␤»
perl6/doc
…/Baggy.pod6 :78:
say $breakfast.grabpairs(1); # OUTPUT: «(eggs => 2)␤»
perl6/doc
…/Baggy.pod6 :79:
say $breakfast.grabpairs(*); # OUTPUT: «()␤»
perl6/doc
…/Baggy.pod6 :84:
# OUTPUT: «X::Immutable: Cannot call 'grabpairs' on an immutable 'Bag'␤»
perl6/doc
…/Baggy.pod6 :106:
say $breakfast.pick; # OUTPUT: «eggs␤»
perl6/doc
…/Baggy.pod6 :107:
say $breakfast.pick(2); # OUTPUT: «(eggs bacon)␤»
perl6/doc
…/Baggy.pod6 :109:
say $breakfast.total; # OUTPUT: «4␤»
perl6/doc
…/Baggy.pod6 :110:
say $breakfast.pick(*); # OUTPUT: «(bacon bacon bacon eggs)␤»
perl6/doc
…/Baggy.pod6 :130:
say $breakfast.pickpairs; # OUTPUT: «eggs => 1␤»
perl6/doc
…/Baggy.pod6 :131:
say $breakfast.pickpairs(1); # OUTPUT: «(bacon => 3)␤»
perl6/doc
…/Baggy.pod6 :132:
say $breakfast.pickpairs(*); # OUTPUT: «(eggs => 1 bacon => 3)␤»
perl6/doc
…/Baggy.pod6 :156:
say $breakfast.roll; # OUTPUT: «bacon␤»
perl6/doc
…/Baggy.pod6 :157:
say $breakfast.roll(3); # OUTPUT: «(bacon eggs bacon)␤»
perl6/doc
…/Baggy.pod6 :160:
say $random_dishes[^5]; # OUTPUT: «(bacon eggs bacon bacon bacon)␤»
perl6/doc
…/Baggy.pod6 :173:
say $seq.sort; # OUTPUT: «(bacon => 2 eggs => 1)␤»
perl6/doc
…/Baggy.pod6 :187:
say $seq.sort; # OUTPUT: «(1 => eggs 2 => bacon)␤»
perl6/doc
…/Baggy.pod6 :202:
say $seq.sort; # OUTPUT: «(1 => eggs 2 => bacon)␤»
perl6/doc
…/Baggy.pod6 :212:
Populates a I<mutable> L«C<Baggy>
perl6/doc
…/Baggy.pod6 :223:
The mapper can be a L«C<Callable>
perl6/doc
…/Baggy.pod6 :224:
an L«C<Associative>
perl6/doc
…/Baggy.pod6 :225:
With L«C<Associative>
perl6/doc
…/Baggy.pod6 :227:
value respectively. A L«C<Callable>
perl6/doc
…/Baggy.pod6 :231:
The mapper's value is used as the key of the L«C<Baggy>
perl6/doc
…/Baggy.pod6 :232:
be incremented by C<1>. See L«C<.categorize-list>
perl6/doc
…/Baggy.pod6 :235:
B<Note:> unlike the L«C<Hash>
perl6/doc
…/Baggy.pod6 :236:
C<.classify-list>, returning an L«C<Iterable>
perl6/doc
…/Baggy.pod6 :237:
will throw, as L«C<Baggy>
perl6/doc
…/Baggy.pod6 :238:
classification. For the same reason, L«C<Baggy>
perl6/doc
…/Baggy.pod6 :249:
Populates a I<mutable> L«C<Baggy>
perl6/doc
…/Baggy.pod6 :266:
The mapper can be a L«C<Callable>
perl6/doc
…/Baggy.pod6 :267:
an L«C<Associative>
perl6/doc
…/Baggy.pod6 :268:
With L«C<Associative>
perl6/doc
…/Baggy.pod6 :270:
value respectively. A L«C<Callable>
perl6/doc
…/Baggy.pod6 :275:
L«C<Baggy>
perl6/doc
…/Baggy.pod6 :277:
B<Note:> unlike the L«C<Hash>
perl6/doc
…/Baggy.pod6 :278:
C<.categorize-list>, returning a list of L«C<Iterables>
perl6/doc
…/Baggy.pod6 :279:
as mapper's value will throw, as L«C<Baggy>
perl6/doc
…/Baggy.pod6 :280:
nested categorization. For the same reason, L«C<Baggy>
perl6/doc
…/Baggy.pod6 :293:
say $breakfast.keys.sort; # OUTPUT: «(eggs spam)␤»
perl6/doc
…/Baggy.pod6 :296:
say $n.keys.sort; # OUTPUT: «(a b)␤»
perl6/doc
…/Baggy.pod6 :307:
say $breakfast.values.sort; # OUTPUT: «(1 3)␤»
perl6/doc
…/Baggy.pod6 :310:
say $n.values.sort; # OUTPUT: «(2 6)␤»
perl6/doc
…/Baggy.pod6 :321:
say $breakfast.kv; # OUTPUT: «(spam 3 eggs 1)␤»
perl6/doc
…/Baggy.pod6 :324:
say $n.kv; # OUTPUT: «(a 6 b 2)␤»
perl6/doc
…/Baggy.pod6 :337:
say $breakfast.kxxv.sort; # OUTPUT: «(bacon eggs spam spam spam)␤»
perl6/doc
…/Baggy.pod6 :340:
say $n.kxxv; # OUTPUT: «(b b b)␤»
perl6/doc
…/Baggy.pod6 :352:
say $breakfast.elems; # OUTPUT: «2␤»
perl6/doc
…/Baggy.pod6 :355:
say $n.elems; # OUTPUT: «1␤»
perl6/doc
…/Baggy.pod6 :367:
say $breakfast.total; # OUTPUT: «4␤»
perl6/doc
…/Baggy.pod6 :370:
say $n.total; # OUTPUT: «8␤»
perl6/doc
…/Baggy.pod6 :381:
say $breakfast.default; # OUTPUT: «0␤»
perl6/doc
…/Baggy.pod6 :394:
say $h.^name; # OUTPUT: «Hash[Any,Any]␤»
perl6/doc
…/Baggy.pod6 :395:
say $h; # OUTPUT: «{bacon => 2, eggs => 1}␤»
perl6/doc
…/Baggy.pod6 :406:
say $breakfast.Bool; # OUTPUT: «True (since we have one element)␤»
perl6/doc
…/Baggy.pod6 :408:
say $breakfast.Bool; # OUTPUT: «False␤»
perl6/doc
…/Baggy.pod6 :419:
say $breakfast.Set; # OUTPUT: «set(bacon, eggs)␤»
perl6/doc
…/Baggy.pod6 :431:
say $sh.^name; # OUTPUT: «SetHash␤»
perl6/doc
…/Baggy.pod6 :432:
say $sh.elems; # OUTPUT: «2␤»
perl6/doc
…/Baggy.pod6 :450:
say $breakfast ~~ Baggy; # OUTPUT: «True␤»
perl6/doc
…/Baggy.pod6 :451:
say $breakfast.does(Baggy); # OUTPUT: «True␤»
perl6/doc
…/Baggy.pod6 :454:
say $breakfast ~~ $second-breakfast; # OUTPUT: «True␤»
perl6/doc
…/Baggy.pod6 :457:
say $second-breakfast ~~ $third-breakfast; # OUTPUT: «False␤»
perl6/doc
…/Blob.pod6 :33:
say $blob.Bool; # OUTPUT: «False␤»
perl6/doc
…/Blob.pod6 :35:
say $blob.Bool; # OUTPUT: «True␤»
perl6/doc
…/Blob.pod6 :46:
say $blob.elems; # OUTPUT: «3␤»
perl6/doc
…/Blob.pod6 :56:
say Blob.new([1, 2, 3]).bytes; # OUTPUT: «3␤»
perl6/doc
…/Blob.pod6 :57:
say blob16.new([1, 2, 3]).bytes; # OUTPUT: «6␤»
perl6/doc
…/Blob.pod6 :58:
say blob64.new([1, 2, 3]).bytes; # OUTPUT: «24␤»
perl6/doc
…/Blob.pod6 :69:
say $blob.decode('utf-8'); # OUTPUT: «string␤»
perl6/doc
…/Blob.pod6 :72:
L«C<utf8-c8>
perl6/doc
…/Blob.pod6 :85:
say Blob.new(1..10).subbuf(2, 4); # OUTPUT: «Blob:0x<03 04 05 06>␤»
perl6/doc
…/Blob.pod6 :86:
say Blob.new(1..10).subbuf(*-2); # OUTPUT: «Blob:0x<09 0a>␤»
perl6/doc
…/Blob.pod6 :87:
say Blob.new(1..10).subbuf(*-5,2); # OUTPUT: «Blob:0x<06 07>␤»
perl6/doc
…/Blob.pod6 :92:
say Blob.new(1..10).subbuf(2..5); # OUTPUT: «Blob:0x<03 04 05 06>␤»
perl6/doc
…/Blob.pod6 :142:
# OUTPUT: «(1 2 3 4 5 6 7 8 9 10)␤»
perl6/doc
…/Blob.pod6 :169:
say Blob.new([1, 2, 3]).reverse; # OUTPUT: «Blob:0x<03 02 01>␤»
perl6/doc
…/Blob.pod6 :170:
say blob16.new([2]).reverse; # OUTPUT: «Blob[uint16]:0x<02>␤»
perl6/doc
…/Blob.pod6 :171:
say buf32.new([16, 32]).reverse; # OUTPUT: «Buf[uint32]:0x<20 10>␤»
perl6/doc
…/Block.pod6 :16:
say $block.^name; # OUTPUT: «Block␤»
perl6/doc
…/Block.pod6 :17:
say $block('hello'); # OUTPUT: «HELLO␤»
perl6/doc
…/Block.pod6 :23:
say $add(40); # OUTPUT: «42␤»
perl6/doc
…/Block.pod6 :27:
X«
perl6/doc
…/Block.pod6 :32:
say $a; # OUTPUT: «4␤»
perl6/doc
…/Block.pod6 :44:
say {1}.(); # OUTPUT: «1␤»
perl6/doc
…/Bool.pod6 :22:
say True.succ; # OUTPUT: «True␤»
perl6/doc
…/Bool.pod6 :23:
say False.succ; # OUTPUT: «True␤»
perl6/doc
…/Bool.pod6 :33:
say True.pred; # OUTPUT: «False␤»
perl6/doc
…/Bool.pod6 :34:
say False.pred; # OUTPUT: «False␤»
perl6/doc
…/Bool.pod6 :45:
say Bool.enums; # OUTPUT: «{False => 0, True => 1}␤»
perl6/doc
…/Bool.pod6 :46:
say False.enums; # OUTPUT: «{False => 0, True => 1}␤»
perl6/doc
…/Bool.pod6 :58:
say Bool.pick; # OUTPUT: «True␤»
perl6/doc
…/Bool.pod6 :59:
say Bool.pick(1); # OUTPUT: «(False)␤»
perl6/doc
…/Bool.pod6 :60:
say Bool.pick(*); # OUTPUT: «(False True)␤»
perl6/doc
…/Bool.pod6 :73:
say Bool.roll; # OUTPUT: «True␤»
perl6/doc
…/Bool.pod6 :74:
say Bool.roll(3); # OUTPUT: «(True False False)␤»
perl6/doc
…/Bool.pod6 :75:
say Bool.roll(*); # OUTPUT: «(...)␤»
perl6/doc
…/Bool.pod6 :83:
say False.Numeric; # OUTPUT: «0␤»
perl6/doc
…/Bool.pod6 :84:
say True.Numeric; # OUTPUT: «1␤»
perl6/doc
…/CallFrame.pod6 :15:
L«C<$?FILE>
perl6/doc
…/CallFrame.pod6 :47:
Return the callable code for the current block. When called on the object returned by C<callframe(0)>, this will be the same value found in L«C<&?BLOCK>
perl6/doc
…/CallFrame.pod6 :81:
say callframe.annotations.^name; # OUTPUT: «Map␤»
perl6/doc
…/CallFrame.pod6 :83:
say callframe.annotations<file> eq callframe.file; # OUTPUT: «True␤»
perl6/doc
…/CallFrame.pod6 :97:
say $frame.my<$the-answer>; # OUTPUT: «42␤»
perl6/doc
…/Callable.pod6 :32:
This method is required for postfix:«( )» and postfix:«.( )». It's what makes
perl6/doc
…/Callable.pod6 :41:
say a(); # OUTPUT: «called␤»
perl6/doc
…/Callable.pod6 :56:
say &slow.assuming(10000000).&bench; # OUTPUT: «(10000000 7.5508834)␤»
perl6/doc
…/Callable.pod6 :66:
&surname-smith.( 'Joe' ); # OUTPUT: «Name is Joe Smith␤»
perl6/doc
…/Callable.pod6 :76:
&surname-public.( 'Joe', 'Q.', 'Jr.'); # OUTPUT: «Name is Joe Q. Public Jr.␤»
perl6/doc
…/Callable.pod6 :81:
&foo.assuming(13, :42foo)(24, :72bar); # OUTPUT: «13 24 42 72␤»
perl6/doc
…/Callable.pod6 :89:
# OUTPUT: «(Perl Python PHP)␤»
perl6/doc
…/Callable.pod6 :94:
say learner :6months; # OUTPUT: «It took me 6 months to learn Perl 6␤»
perl6/doc
…/Callable.pod6 :100:
=head2 C«infix:<∘>»
perl6/doc
…/Callable.pod6 :103:
The function composition operator C«infix:<∘>» or C«infix:<o>» combines two functions, so
perl6/doc
…/Callable.pod6 :105:
If the L«C<.count>
perl6/doc
…/Callable.pod6 :114:
say composed 2; # OUTPUT: «g␤f␤2␤»
perl6/doc
…/Callable.pod6 :124:
say composed 'abc'; # OUTPUT: «cba␤»
perl6/doc
…/Capture.pod6 :20:
C«=>», followed by the argument and 2) use a colon-pair literal named
perl6/doc
…/Capture.pod6 :23:
say unique 1, -2, 2, 3, as => { abs $_ }; # OUTPUT: «(1 -2 3)␤»
perl6/doc
…/Capture.pod6 :25:
say unique 1, -2, 2, 3, :as({ abs $_ }); # OUTPUT: «(1 -2 3)␤»
perl6/doc
…/Capture.pod6 :28:
# OUTPUT: «(1 -2 2 3 as => -> ;; $_? is raw { #`(Block
perl6/doc
…/Capture.pod6 :46:
reverse(
perl6/doc
…/Capture.pod6 :47:
sort(5,
perl6/doc
…/Capture.pod6 :63:
sort(
perl6/doc
…/Capture.pod6 :65:
sort(
perl6/doc
…/Capture.pod6 :78:
say $c.list; # OUTPUT: «(2 3 5)␤»
perl6/doc
…/Capture.pod6 :89:
say $c.hash; # OUTPUT: «Map.new((:apples(:red(2))))␤»
perl6/doc
…/Capture.pod6 :100:
say $c.elems; # OUTPUT: «3␤»
perl6/doc
…/Capture.pod6 :113:
say $capture.keys; # OUTPUT: «(0 1 2 apples)␤»
perl6/doc
…/Capture.pod6 :125:
say $capture.values; # OUTPUT: «(2 3 5 red => 2)␤»
perl6/doc
…/Capture.pod6 :138:
say $capture.kv; # OUTPUT: «(0 2 1 3 apples red => 2)␤»
perl6/doc
…/Capture.pod6 :152:
say $c.pairs; # OUTPUT: «(0 => 2 1 => 3 apples => red => 2)␤»
perl6/doc
…/Capture.pod6 :167:
say $capture.antipairs; # OUTPUT: «(2 => 0 3 => 1 (red => 2) => apples)␤»
perl6/doc
…/Capture.pod6 :178:
say \(1,2,3, apples => 2).Bool; # OUTPUT: «True␤»
perl6/doc
…/Capture.pod6 :179:
say \().Bool; # OUTPUT: «False␤»
perl6/doc
…/Capture.pod6 :189:
say \(1,2,3, apples => 2).Capture; # OUTPUT: «\(1, 2, 3, :apples(2))␤»
perl6/doc
…/Capture.pod6 :199:
say \(1,2,3, apples => 2).Numeric; # OUTPUT: «3␤»
perl6/doc
…/Channel.pod6 :46:
say $c.list; # OUTPUT: «(1 [2 3 4 5])␤»
perl6/doc
…/Channel.pod6 :70:
say $c.receive; # OUTPUT: «1␤»
perl6/doc
…/Channel.pod6 :109:
# OUTPUT: «X::Channel::SendOnClosed: Cannot send a message on a closed channel␤»
perl6/doc
…/Channel.pod6 :127:
say $c.list; # OUTPUT: «(1 2)␤»
perl6/doc
…/Channel.pod6 :158:
# OUTPUT: «X::AdHoc: Bad error happens!␤»
perl6/doc
…/Code.pod6 :39:
say &argless.arity; # OUTPUT: «0␤»
perl6/doc
…/Code.pod6 :40:
say &args.arity; # OUTPUT: «1␤»
perl6/doc
…/Code.pod6 :41:
say &slurpy.arity; # OUTPUT: «2␤»
perl6/doc
…/Code.pod6 :57:
say &argless.count; # OUTPUT: «0␤»
perl6/doc
…/Code.pod6 :58:
say &args.count; # OUTPUT: «2␤»
perl6/doc
…/Code.pod6 :59:
say &slurpy.count; # OUTPUT: «Inf␤»
perl6/doc
…/Code.pod6 :70:
say -> () --> Int {}.of; # OUTPUT: «(Int)␤»
perl6/doc
…/Code.pod6 :82:
say &a.signature; # OUTPUT: «(Int $one, Str $two)␤»
perl6/doc
…/Code.pod6 :93:
say ~&marine; # OUTPUT: «marine␤»
perl6/doc
…/Code.pod6 :94:
say &marine.Str; # OUTPUT: «marine␤»
perl6/doc
…/Complex.pod6 :42:
say (3+5i).re; # OUTPUT: «3␤»
perl6/doc
…/Complex.pod6 :52:
say (3+5i).im; # OUTPUT: «5␤»
perl6/doc
…/Complex.pod6 :62:
say (3+5i).reals; # OUTPUT: «(3 5)␤»
perl6/doc
…/Complex.pod6 :72:
say (NaN+5i).isNaN; # OUTPUT: «True␤»
perl6/doc
…/Complex.pod6 :73:
say (7+5i).isNaN; # OUTPUT: «False␤»
perl6/doc
…/Complex.pod6 :84:
say (10+7i).polar; # OUTPUT: «(12.2065556157337 0.610725964389209)␤»
perl6/doc
…/Complex.pod6 :96:
say (1.2-3.8i).floor; # OUTPUT: «1-4i␤»
perl6/doc
…/Complex.pod6 :108:
say (1.2-3.8i).ceiling; # OUTPUT: «2-3i␤»
perl6/doc
…/Complex.pod6 :122:
say (1.2-3.8i).round; # OUTPUT: «1-4i␤»
perl6/doc
…/Complex.pod6 :123:
say (1.256-3.875i).round(0.1); # OUTPUT: «1.3-3.9i␤»
perl6/doc
…/Complex.pod6 :134:
say (1.2-3.8i).truncate; # OUTPUT: «1-3i␤»
perl6/doc
…/Complex.pod6 :147:
say (3+4i).abs; # OUTPUT: «5␤»
perl6/doc
…/Complex.pod6 :159:
say (1-4i).conj; # OUTPUT: «1+4i␤»
perl6/doc
…/Complex.pod6 :170:
say (1-4i).gist; # OUTPUT: «1-4i␤»
perl6/doc
…/Complex.pod6 :183:
say (1-3i).perl; # OUTPUT: «<1-3i>␤»
perl6/doc
…/ComplexStr.pod6 :14:
my $f = <42+0i>; say $f.^name; # OUTPUT: «ComplexStr␤»
perl6/doc
…/ComplexStr.pod6 :16:
As a subclass of both L«C<Complex>
perl6/doc
…/ComplexStr.pod6 :36:
say +$f; # OUTPUT: «42+0i␤»
perl6/doc
…/ComplexStr.pod6 :37:
say ~$f; # OUTPUT: «"forty two (but complicated)"␤»
perl6/doc
…/ComplexStr.pod6 :70:
say < 5+0i> ~~ "5.0"; # OUTPUT: «False␤»
perl6/doc
…/ComplexStr.pod6 :71:
say < 5+0i> ~~ 5.0 ; # OUTPUT: «True␤»
perl6/doc
…/ComplexStr.pod6 :72:
say < 5+0i> ~~ <5.0>; # OUTPUT: «True␤»
perl6/doc
…/ComplexStr.pod6 :86:
say $f cmp $g; # OUTPUT: «Less␤»
perl6/doc
…/ComplexStr.pod6 :87:
say $f.Str cmp $g.Str; # OUTPUT: «More␤»
perl6/doc
…/Cool.pod6 :132:
say (-2).abs; # OUTPUT: «2␤»
perl6/doc
…/Cool.pod6 :133:
say abs "6+8i"; # OUTPUT: «10␤»
perl6/doc
…/Cool.pod6 :145:
say (1+2i).conj; # OUTPUT: «1-2i␤»
perl6/doc
…/Cool.pod6 :159:
say 4.sqrt; # OUTPUT: «2␤»
perl6/doc
…/Cool.pod6 :160:
say sqrt(2); # OUTPUT: «1.4142135623731␤»
perl6/doc
…/Cool.pod6 :171:
say 6.sign; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :172:
say (-6).sign; # OUTPUT: «-1␤»
perl6/doc
…/Cool.pod6 :173:
say "0".sign; # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :184:
say 1e5.rand; # OUTPUT: «33128.495184283␤»
perl6/doc
…/Cool.pod6 :196:
say sin(0); # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :197:
say sin(pi/4); # OUTPUT: «0.707106781186547␤»
perl6/doc
…/Cool.pod6 :198:
say sin(pi/2); # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :215:
say 0.1.asin; # OUTPUT: «0.10016742116156␤»
perl6/doc
…/Cool.pod6 :216:
say asin(0.1); # OUTPUT: «0.10016742116156␤»
perl6/doc
…/Cool.pod6 :228:
say 0.cos; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :229:
say pi.cos; # OUTPUT: «-1␤»
perl6/doc
…/Cool.pod6 :230:
say cos(pi/2); # OUTPUT: «6.12323399573677e-17␤»
perl6/doc
…/Cool.pod6 :243:
say 1.acos; # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :244:
say acos(-1); # OUTPUT: «3.14159265358979␤»
perl6/doc
…/Cool.pod6 :256:
say tan(3); # OUTPUT: «-0.142546543074278␤»
perl6/doc
…/Cool.pod6 :257:
say 3.tan; # OUTPUT: «-0.142546543074278␤»
perl6/doc
…/Cool.pod6 :270:
say atan(3); # OUTPUT: «1.24904577239825␤»
perl6/doc
…/Cool.pod6 :271:
say 3.atan; # OUTPUT: «1.24904577239825␤»
perl6/doc
…/Cool.pod6 :285:
say atan2(3); # OUTPUT: «1.24904577239825␤»
perl6/doc
…/Cool.pod6 :286:
say 3.atan2; # OUTPUT: «1.24904577239825␤»
perl6/doc
…/Cool.pod6 :299:
say 45.sec; # OUTPUT: «1.90359440740442␤»
perl6/doc
…/Cool.pod6 :300:
say sec(45); # OUTPUT: «1.90359440740442␤»
perl6/doc
…/Cool.pod6 :313:
say 1.asec; # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :314:
say sqrt(2).asec; # OUTPUT: «0.785398163397448␤»
perl6/doc
…/Cool.pod6 :327:
say 0.45.cosec; # OUTPUT: «2.29903273150897␤»
perl6/doc
…/Cool.pod6 :328:
say cosec(0.45); # OUTPUT: «2.29903273150897␤»
perl6/doc
…/Cool.pod6 :341:
say 45.acosec; # OUTPUT: «0.0222240516182672␤»
perl6/doc
…/Cool.pod6 :342:
say acosec(45) # OUTPUT: «0.0222240516182672␤»
perl6/doc
…/Cool.pod6 :355:
say 45.cotan; # OUTPUT: «0.617369623783555␤»
perl6/doc
…/Cool.pod6 :356:
say cotan(45); # OUTPUT: «0.617369623783555␤»
perl6/doc
…/Cool.pod6 :369:
say 45.acotan; # OUTPUT: «0.0222185653267191␤»
perl6/doc
…/Cool.pod6 :370:
say acotan(45) # OUTPUT: «0.0222185653267191␤»
perl6/doc
…/Cool.pod6 :382:
say 1.sinh; # OUTPUT: «1.1752011936438␤»
perl6/doc
…/Cool.pod6 :383:
say sinh(1); # OUTPUT: «1.1752011936438␤»
perl6/doc
…/Cool.pod6 :395:
say 1.asinh; # OUTPUT: «0.881373587019543␤»
perl6/doc
…/Cool.pod6 :396:
say asinh(1); # OUTPUT: «0.881373587019543␤»
perl6/doc
…/Cool.pod6 :408:
say cosh(0.5); # OUTPUT: «1.12762596520638␤»
perl6/doc
…/Cool.pod6 :420:
say acosh(45); # OUTPUT: «4.4996861906715␤»
perl6/doc
…/Cool.pod6 :432:
say tanh(0.5); # OUTPUT: «0.46211715726001␤»
perl6/doc
…/Cool.pod6 :433:
say tanh(atanh(0.5)); # OUTPUT: «0.5␤»
perl6/doc
…/Cool.pod6 :445:
say atanh(0.5); # OUTPUT: «0.549306144334055␤»
perl6/doc
…/Cool.pod6 :457:
say 0.sech; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :469:
say 0.8.asech; # OUTPUT: «0.693147180559945␤»
perl6/doc
…/Cool.pod6 :481:
say cosech(pi/2); # OUTPUT: «0.434537208094696␤»
perl6/doc
…/Cool.pod6 :493:
say acosech(4.5); # OUTPUT: «0.220432720979802␤»
perl6/doc
…/Cool.pod6 :505:
say cotanh(pi); # OUTPUT: «1.00374187319732␤»
perl6/doc
…/Cool.pod6 :517:
say acotanh(2.5); # OUTPUT: «0.423648930193602␤»
perl6/doc
…/Cool.pod6 :529:
say cis(pi/4); # OUTPUT: «0.707106781186548+0.707106781186547i␤»
perl6/doc
…/Cool.pod6 :545:
say (e*e).log; # OUTPUT: «2␤»
perl6/doc
…/Cool.pod6 :560:
say log10(1001); # OUTPUT: «3.00043407747932␤»
perl6/doc
…/Cool.pod6 :573:
say 0.exp; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :574:
say 1.exp; # OUTPUT: «2.71828182845905␤»
perl6/doc
…/Cool.pod6 :575:
say 10.exp; # OUTPUT: «22026.4657948067␤»
perl6/doc
…/Cool.pod6 :587:
say sqrt(2).unpolar(pi/4); # OUTPUT: «1+1i␤»
perl6/doc
…/Cool.pod6 :599:
say 1.7.round; # OUTPUT: «2␤»
perl6/doc
…/Cool.pod6 :600:
say 1.07.round(0.1); # OUTPUT: «1.1␤»
perl6/doc
…/Cool.pod6 :601:
say 21.round(10); # OUTPUT: «20␤»
perl6/doc
…/Cool.pod6 :605:
say (−.5 ).round; # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :606:
say ( .5 ).round; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :607:
say (−.55).round(.1); # OUTPUT: «-0.5␤»
perl6/doc
…/Cool.pod6 :608:
say ( .55).round(.1); # OUTPUT: «0.6␤»
perl6/doc
…/Cool.pod6 :620:
say "1.99".floor; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :621:
say "-1.9".floor; # OUTPUT: «-2␤»
perl6/doc
…/Cool.pod6 :622:
say 0.floor; # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :634:
say "1".ceiling; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :635:
say "-0.9".ceiling; # OUTPUT: «0␤»
perl6/doc
…/Cool.pod6 :636:
say "42.1".ceiling; # OUTPUT: «43␤»
perl6/doc
…/Cool.pod6 :648:
say 1.2.truncate; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :649:
say truncate -1.2; # OUTPUT: «-1␤»
perl6/doc
…/Cool.pod6 :663:
say 'a'.ord; # OUTPUT: «97␤»
perl6/doc
…/Cool.pod6 :680:
say '65'.chr; # OUTPUT: «A␤»
perl6/doc
…/Cool.pod6 :697:
say 'møp'.chars; # OUTPUT: «3␤»
perl6/doc
…/Cool.pod6 :709:
say 'møp'.codes; # OUTPUT: «3␤»
perl6/doc
…/Cool.pod6 :720:
say 421.flip; # OUTPUT: «124␤»
perl6/doc
…/Cool.pod6 :733:
say "<$stripped>"; # OUTPUT: «<abc>␤»
perl6/doc
…/Cool.pod6 :746:
say "<$stripped>"; # OUTPUT: «<abc >␤»
perl6/doc
…/Cool.pod6 :759:
say "<$stripped>"; # OUTPUT: «< abc>␤»
perl6/doc
…/Cool.pod6 :771:
say "ABC".lc; # OUTPUT: «abc␤»
perl6/doc
…/Cool.pod6 :783:
say "Abc".uc; # OUTPUT: «ABC␤»
perl6/doc
…/Cool.pod6 :797:
say "groß".fc; # OUTPUT: «gross␤»
perl6/doc
…/Cool.pod6 :809:
say "abC".tc; # OUTPUT: «AbC␤»
perl6/doc
…/Cool.pod6 :822:
say 'abC'.tclc; # OUTPUT: «Abc␤»
perl6/doc
…/Cool.pod6 :836:
say "perl 6 programming".wordcase; # OUTPUT: «Perl 6 Programming␤»
perl6/doc
…/Cool.pod6 :863:
say "perL 6".samecase("A__a__"); # OUTPUT: «Perl 6␤»
perl6/doc
…/Cool.pod6 :864:
say "pERL 6".samecase("Ab"); # OUTPUT: «Perl 6␤»
perl6/doc
…/Cool.pod6 :881:
say 'a'.uniprop; # OUTPUT: «Ll␤»
perl6/doc
…/Cool.pod6 :882:
say '1'.uniprop; # OUTPUT: «Nd␤»
perl6/doc
…/Cool.pod6 :883:
say 'a'.uniprop('Alphabetic'); # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :884:
say '1'.uniprop('Alphabetic'); # OUTPUT: «False␤»
perl6/doc
…/Cool.pod6 :911:
say ‘»ö«’.uniname;
perl6/doc
…/Cool.pod6 :912:
# OUTPUT: «"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"␤»
perl6/doc
…/Cool.pod6 :914:
# OUTPUT: «"LATIN CAPITAL LETTER D WITH DOT BELOW"␤»
perl6/doc
…/Cool.pod6 :918:
# OUTPUT: ««ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM␤»␤»
perl6/doc
…/Cool.pod6 :929:
say ‘»ö«’.uninames.perl;
perl6/doc
…/Cool.pod6 :930:
# OUTPUT: «("RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK", "LATIN SMALL LETTER O WITH DIAERESIS", "LEFT-POINTING DOUBLE ANGLE QUOTATION MARK").Seq␤»
perl6/doc
…/Cool.pod6 :936:
# OUTPUT: «(("LATIN CAPITAL LETTER D WITH DOT BELOW", "COMBINING DOT ABOVE").Seq, ("APOSTROPHE",).Seq, ("LATIN SMALL LETTER O",).Seq, ("LATIN SMALL LETTER H",).Seq)␤»
perl6/doc
…/Cool.pod6 :949:
say unimatch 'A', 'Latin'; # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :950:
say unimatch 'A', 'Latin', 'Script'; # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :951:
say unimatch 'A', 'Ll'; # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :963:
say 'perl'.chop; # OUTPUT: «per␤»
perl6/doc
…/Cool.pod6 :975:
say 'ab'.chomp.chars; # OUTPUT: «2␤»
perl6/doc
…/Cool.pod6 :976:
say "a\n".chomp.chars; # OUTPUT: «1␤»
perl6/doc
…/Cool.pod6 :989:
say 'zenith'.substr(2); # OUTPUT: «nith␤»
perl6/doc
…/Cool.pod6 :990:
say 'zenith'.substr(0, 3); # OUTPUT: «zen␤»
perl6/doc
…/Cool.pod6 :993:
say 20151224.substr(6); # OUTPUT: «24␤»
perl6/doc
…/Cool.pod6 :996:
say substr "zenith", 0, 3; # OUTPUT: «zen␤»
perl6/doc
…/Cool.pod6 :1002:
say 20151224.substr(*-2); # OUTPUT: «24␤»
perl6/doc
…/Cool.pod6 :1014:
say "Camelia".ords; # OUTPUT: «67 97 109 101 108 105 97␤»
perl6/doc
…/Cool.pod6 :1015:
say ords 10; # OUTPUT: «49 48␤»
perl6/doc
…/Cool.pod6 :1031:
say <67 97 109 101 108 105 97>.chrs; # OUTPUT: «Camelia␤»
perl6/doc
…/Cool.pod6 :1054:
say split(';', "a;b;c").perl; # OUTPUT: «("a", "b", "c")␤»
perl6/doc
…/Cool.pod6 :1055:
say split(';', "a;b;c", 2).perl; # OUTPUT: «("a", "b;c").Seq␤»
perl6/doc
…/Cool.pod6 :1057:
say split(';', "a;b;c,d").perl; # OUTPUT: «("a", "b", "c,d")␤»
perl6/doc
…/Cool.pod6 :1058:
say split(/\;/, "a;b;c,d").perl; # OUTPUT: «("a", "b", "c,d")␤»
perl6/doc
…/Cool.pod6 :1059:
say split(/<[;,]>/, "a;b;c,d").perl; # OUTPUT: «("a", "b", "c", "d")␤»
perl6/doc
…/Cool.pod6 :1061:
say split(['a', /b+/, 4], '1a2bb345').perl; # OUTPUT: «("1", "2", "3", "5")␤»
perl6/doc
…/Cool.pod6 :1075:
say 'abc'.split(/b/, :v); # OUTPUT: «(a 「b」 c)␤»
perl6/doc
…/Cool.pod6 :1076:
say 'abc'.split('b', :v); # OUTPUT: «(a b c)␤»
perl6/doc
…/Cool.pod6 :1080:
say 'abc'.split(/b/, :k); # OUTPUT: «(a 0 c)␤»
perl6/doc
…/Cool.pod6 :1084:
say 'abc'.split(/b/, :kv); # OUTPUT: «(a 0 「b」 c)␤»
perl6/doc
…/Cool.pod6 :1089:
say 'abc'.split(/b/, :p); # OUTPUT: «(a 0 => 「b」 c)␤»
perl6/doc
…/Cool.pod6 :1090:
say 'abc'.split('b', :p); # OUTPUT: «(a 0 => b c)␤»
perl6/doc
…/Cool.pod6 :1098:
say ("f,,b,c,d".split: /","/ ).perl; # OUTPUT: «("f", "", "b", "c", "d")␤»
perl6/doc
…/Cool.pod6 :1099:
say ("f,,b,c,d".split: /","/, :skip-empty).perl; # OUTPUT: «("f", "b", "c", "d")␤»
perl6/doc
…/Cool.pod6 :1114:
say lines("a\nb\n").join('
perl6/doc
…/Cool.pod6 :1115:
say "some\nmore\nlines".lines.elems; # OUTPUT: «3␤»
perl6/doc
…/Cool.pod6 :1147:
say 'The quick brown fox'.words.join('
perl6/doc
…/Cool.pod6 :1148:
say 'The quick brown fox'.words(2).join('
perl6/doc
…/Cool.pod6 :1152:
say "isn't, can't".words.join('
perl6/doc
…/Cool.pod6 :1165:
say "6 or 12".comb(/\d+/).join(", "); # OUTPUT: «6, 12␤»
perl6/doc
…/Cool.pod6 :1175:
say "Hello, World".contains('Hello'); # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :1176:
say "Hello, World".contains('hello'); # OUTPUT: «False␤»
perl6/doc
…/Cool.pod6 :1177:
say "Hello, World".contains(','); # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :1178:
say "Hello, World".contains(',', 3); # OUTPUT: «True␤»
perl6/doc
…/Cool.pod6 :1179:
say "Hello, World".contains(',', 10); # OUTPUT: «False␤»
perl6/doc
…/Cool.pod6 :1231:
say 11.fmt('This Int equals %03d'); # OUTPUT: «This Int equals 011␤»
perl6/doc
…/Cool.pod6 :1232:
say '16'.fmt('Hexadecimal %x'); # OUTPUT: «Hexadecimal 10␤»
perl6/doc
…/Cool.pod6 :1257:
# OUTPUT:«2+0i 1.22464679914735e-16+2i -2+2.44929359829471e-16i -3.67394039744206e-16-2i␤»
perl6/doc
…/Cool.pod6 :1258:
# OUTPUT:«1.77635683940025e-15␤»
perl6/doc
…/Cool.pod6 :1259:
# OUTPUT:«4.30267170434156e-15␤»
perl6/doc
…/Cool.pod6 :1260:
# OUTPUT:«8.03651692704705e-15␤»
perl6/doc
…/Cool.pod6 :1261:
# OUTPUT:«1.04441561648202e-14␤»
perl6/doc
…/Cool.pod6 :1292:
EVAL "say { 5 + 5 }"; # OUTPUT: «10␤»
perl6/doc
…/Cool.pod6 :1297:
EVAL 'say $answer;'; # OUTPUT: «42␤»
perl6/doc
…/Cool.pod6 :1310:
say $M::answer; # OUTPUT: «42␤»
perl6/doc
…/Cool.pod6 :1317:
EVAL 'say 2 mean 6 mean 4'; # OUTPUT: «4␤»
perl6/doc
…/Cool.pod6 :1324:
say EVAL 'say 1; 2 mean 6 mean 4'; # OUTPUT: «1␤4␤»
perl6/doc
…/Date.pod6 :21:
say $d; # OUTPUT: «2015-12-24␤»
perl6/doc
…/Date.pod6 :22:
say $d.year; # OUTPUT: «2015␤»
perl6/doc
…/Date.pod6 :23:
say $d.month; # OUTPUT: «12␤»
perl6/doc
…/Date.pod6 :24:
say $d.day; # OUTPUT: «24␤»
perl6/doc
…/Date.pod6 :25:
say $d.day-of-week; # OUTPUT: «4␤» (Thursday)
perl6/doc
…/Date.pod6 :26:
say $d.later(days => 20); # OUTPUT: «2016-01-13␤»
perl6/doc
…/Date.pod6 :28:
say $n - $d; # OUTPUT: «7␤», 7 days between New Years/Christmas Eve
perl6/doc
…/Date.pod6 :29:
say $n + 1; # OUTPUT: «2016-01-01␤»
perl6/doc
…/Date.pod6 :65:
say Date.new-from-daycount(49987); # OUTPUT: «1995-09-27␤»
perl6/doc
…/Date.pod6 :76:
say Date.new('2015-11-24').clone(month => 12); # OUTPUT: «2015-12-24␤»
perl6/doc
…/Date.pod6 :106:
say Date.new('2015-12-24').later(:2years); # OUTPUT: «2017-12-24␤»
perl6/doc
…/Date.pod6 :112:
say $d.later(month => 1).later(:2days); # OUTPUT: «2015-03-29␤»
perl6/doc
…/Date.pod6 :113:
say $d.later(days => 2).later(:1month); # OUTPUT: «2015-04-01␤»
perl6/doc
…/Date.pod6 :129:
say $d.earlier(month => 5).earlier(:2days); # OUTPUT: «2014-09-25␤»
perl6/doc
…/Date.pod6 :141:
say $c.truncated-to('year'); # OUTPUT: «2012-01-01␤»
perl6/doc
…/Date.pod6 :142:
say $c.truncated-to('month'); # OUTPUT: «2012-12-01␤»
perl6/doc
…/Date.pod6 :143:
say $c.truncated-to('week'); # OUTPUT: «2012-12-24␤», because it's Monday already
perl6/doc
…/Date.pod6 :153:
say Date.new("2016-02-28").succ; # OUTPUT: «2016-02-29␤»
perl6/doc
…/Date.pod6 :163:
say Date.new("2016-01-01").pred; # OUTPUT: «2015-12-31␤»
perl6/doc
…/Date.pod6 :176:
say Date.new('2015-12-24').Str; # OUTPUT: «2015-12-24␤»
perl6/doc
…/Date.pod6 :179:
say Date.new('2015-12-24', formatter => $fmt).Str; # OUTPUT: «12/24/2015␤»
perl6/doc
…/Date.pod6 :189:
say Date.new('2015-12-24').gist; # OUTPUT: «2015-12-24␤»
perl6/doc
…/Date.pod6 :199:
say Date.new('2015-12-24').Date; # OUTPUT: «2015-12-24␤»
perl6/doc
…/Date.pod6 :200:
say Date.Date; # OUTPUT: «(Date)␤»
perl6/doc
…/Date.pod6 :209:
Converts the invocant to L«C<DateTime>
perl6/doc
…/Date.pod6 :211:
say Date.new('2015-12-24').DateTime; # OUTPUT: «2015-12-24T00:00:00Z␤»
perl6/doc
…/Date.pod6 :212:
say Date.DateTime; # OUTPUT: «(DateTime)␤»
perl6/doc
…/Date.pod6 :237:
say $after-$before; # OUTPUT: «2.502411561␤»
perl6/doc
…/Date.pod6 :242:
say $after-$before; # OUTPUT: «5.20156987␤»
perl6/doc
…/Date.pod6 :252:
say sleep-timer 3.14; # OUTPUT: «0␤»
perl6/doc
…/Date.pod6 :266:
say sleep-until now+10; # OUTPUT: «True␤»
perl6/doc
…/Date.pod6 :271:
say sleep-until $instant; # OUTPUT: «False␤»
perl6/doc
…/Date.pod6 :279:
say sleep-until $instant; # OUTPUT: «True␤»
perl6/doc
…/Date.pod6 :320:
Takes a date to subtract from and either an L«C<Int>
perl6/doc
…/Date.pod6 :321:
the number of days to subtract, or another L«C<Date>
perl6/doc
…/Date.pod6 :322:
Returns a new L«C<Date>
perl6/doc
…/Date.pod6 :325:
say Date.new('2016-12-25') - Date.new('2016-12-24'); # OUTPUT: «1␤»
perl6/doc
…/Date.pod6 :326:
say Date.new('2015-12-25') - Date.new('2016-11-21'); # OUTPUT: «-332␤»
perl6/doc
…/Date.pod6 :327:
say Date.new('2016-11-21') - 332; # OUTPUT: «2015-12-25␤»
perl6/doc
…/Date.pod6 :334:
Takes an L«C<Int>
perl6/doc
…/Date.pod6 :335:
L«C<Date>
perl6/doc
…/Date.pod6 :337:
say Date.new('2015-12-25') + 332; # OUTPUT: «2016-11-21␤»
perl6/doc
…/Date.pod6 :338:
say 1 + Date.new('2015-12-25'); # OUTPUT: «2015-12-26␤»
perl6/doc
…/DateTime.pod6 :31:
say $dt; # OUTPUT: «2015-11-21T16:01:00Z␤»
perl6/doc
…/DateTime.pod6 :32:
say $dt.later(days => 20); # OUTPUT: «2015-12-11T16:01:00Z␤»
perl6/doc
…/DateTime.pod6 :33:
say $dt.truncated-to('hour'); # OUTPUT: «2015-11-21T16:00:00Z␤»
perl6/doc
…/DateTime.pod6 :34:
say $dt.in-timezone(-8 * 3600); # OUTPUT: «2015-11-21T08:01:00-0800␤»
perl6/doc
…/DateTime.pod6 :95:
say $datetime = DateTime.new(1470853583); # OUTPUT: «2016-08-10T18:26:23Z␤»
perl6/doc
…/DateTime.pod6 :107:
and defaults to the value of L«C<$*TZ> variable
perl6/doc
…/DateTime.pod6 :121:
# OUTPUT: «2015-12-24T00:23:00Z␤»
perl6/doc
…/DateTime.pod6 :127:
# OUTPUT: «X::OutOfRange: Day out of range. Is: 29, should be in 1..28␤»
perl6/doc
…/DateTime.pod6 :138:
# OUTPUT: «22:34:56␤»
perl6/doc
…/DateTime.pod6 :148:
say DateTime.new('2012-02-29T12:34:56Z').hour; # OUTPUT: «12␤»
perl6/doc
…/DateTime.pod6 :158:
say DateTime.new('2012-02-29T12:34:56Z').minute; # OUTPUT: «34␤»
perl6/doc
…/DateTime.pod6 :168:
say DateTime.new('2012-02-29T12:34:56Z').second; # OUTPUT: «56␤»
perl6/doc
…/DateTime.pod6 :169:
say DateTime.new('2012-02-29T12:34:56.789Z').second; # OUTPUT: «56.789␤»
perl6/doc
…/DateTime.pod6 :180:
say DateTime.new('2012-02-29T12:34:56.789Z').whole-second; # OUTPUT: «56␤»
perl6/doc
…/DateTime.pod6 :190:
say DateTime.new('2015-12-24T12:23:00+0200').timezone; # OUTPUT: «7200␤»
perl6/doc
…/DateTime.pod6 :201:
say DateTime.new('2015-12-24T12:23:00+0200').offset; # OUTPUT: «7200␤»
perl6/doc
…/DateTime.pod6 :211:
say DateTime.new('2015-12-24T12:23:00+0200').offset-in-minutes; # OUTPUT: «120␤»
perl6/doc
…/DateTime.pod6 :221:
say DateTime.new('2015-12-24T12:23:00+0200').offset-in-hours; # OUTPUT: «2␤»
perl6/doc
…/DateTime.pod6 :233:
say DateTime.new('2015-12-24T12:23:00+0200').Str; # OUTPUT: «2015-12-24T12:23:00+02:00␤»
perl6/doc
…/DateTime.pod6 :243:
say DateTime.new('2015-12-24T12:23:00+0200').Instant; # OUTPUT: «2015-12-24T12:23:00+02:00␤»
perl6/doc
…/DateTime.pod6 :254:
say DateTime.new('2015-12-24T12:23:00Z').posix; # OUTPUT: «1450959780␤»
perl6/doc
…/DateTime.pod6 :274:
say DateTime.new('2015-12-24T12:23:00Z').later(:2years); # OUTPUT: «2017-12-24T12:23:00Z␤»
perl6/doc
…/DateTime.pod6 :280:
say $d.later(month => 1).later(:2days); # OUTPUT: «2015-03-29T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :281:
say $d.later(days => 2).later(:1month); # OUTPUT: «2015-04-01T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :297:
say $d.earlier(month => 1).earlier(:2days); # OUTPUT: «2015-01-25T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :309:
say $d.truncated-to('second'); # OUTPUT: «2012-02-29T12:34:56Z␤»
perl6/doc
…/DateTime.pod6 :310:
say $d.truncated-to('minute'); # OUTPUT: «2012-02-29T12:34:00Z␤»
perl6/doc
…/DateTime.pod6 :311:
say $d.truncated-to('hour'); # OUTPUT: «2012-02-29T12:00:00Z␤»
perl6/doc
…/DateTime.pod6 :312:
say $d.truncated-to('day'); # OUTPUT: «2012-02-29T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :313:
say $d.truncated-to('month'); # OUTPUT: «2012-02-01T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :314:
say $d.truncated-to('year'); # OUTPUT: «2012-01-01T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :326:
Converts the invocant to L«C<Date>
perl6/doc
…/DateTime.pod6 :328:
say DateTime.new("2012-02-29T12:34:56.946314Z").Date; # OUTPUT: «2012-02-29␤»
perl6/doc
…/DateTime.pod6 :329:
say DateTime.Date; # OUTPUT: «(Date)␤»
perl6/doc
…/DateTime.pod6 :340:
say DateTime.DateTime; # OUTPUT: «(DateTime)␤»
perl6/doc
…/DateTime.pod6 :350:
say DateTime.new('2015-12-24T12:23:00+0200').utc; # OUTPUT: «2015-12-24T10:23:00Z␤»
perl6/doc
…/DateTime.pod6 :361:
say DateTime.new('2015-12-24T12:23:00Z').in-timezone(3600 + 1800); # OUTPUT: «2015-12-24T13:53:00+0130␤»
perl6/doc
…/DateTime.pod6 :370:
(L«C<$*TZ>
perl6/doc
…/DateTime.pod6 :373:
say DateTime.new('2015-12-24T12:23:00+0200').local; # OUTPUT: «2015-12-24T09:23:00-0100␤»
perl6/doc
…/DateTime.pod6 :380:
Takes a L«C<DateTime>
perl6/doc
…/DateTime.pod6 :381:
L«C<Duration>
perl6/doc
…/DateTime.pod6 :386:
say perl DateTime.new(:2016year) - DateTime.new(:2015year):; # OUTPUT: «Duration.new(31536001.0)␤»
perl6/doc
…/DateTime.pod6 :387:
say DateTime.new(:2016year, :3600timezone) - Duration.new(31536001.0); # OUTPUT: «2015-01-01T00:00:00+01:00␤»
perl6/doc
…/DateTime.pod6 :394:
Takes a L«C<DateTime>
perl6/doc
…/DateTime.pod6 :395:
L«C<Duration>
perl6/doc
…/DateTime.pod6 :397:
say DateTime.new(:2015year) + Duration.new(31536001.0); # OUTPUT: «2016-01-01T00:00:00Z␤»
perl6/doc
…/DateTime.pod6 :398:
say Duration.new(42) + DateTime.new(:2015year, :3600timezone); # OUTPUT: «2015-01-01T00:00:42+01:00␤»
perl6/doc
…/Dateish.pod6 :23:
say Date.new('2015-12-31').year; # OUTPUT: «2015␤»
perl6/doc
…/Dateish.pod6 :24:
say DateTime.new(date => Date.new('2015-12-24'), hour => 1).year; # OUTPUT: «2015␤»
perl6/doc
…/Dateish.pod6 :34:
say Date.new('2015-12-31').month; # OUTPUT: «12␤»
perl6/doc
…/Dateish.pod6 :35:
say DateTime.new(date => Date.new('2015-12-24'), hour => 1).month; # OUTPUT: «12␤»
perl6/doc
…/Dateish.pod6 :45:
say Date.new('2015-12-31').day; # OUTPUT: «31␤»
perl6/doc
…/Dateish.pod6 :46:
say DateTime.new(date => Date.new('2015-12-24'), hour => 1).day; # OUTPUT: «24␤»
perl6/doc
…/Dateish.pod6 :64:
say $dt.formatter.^name; # OUTPUT: «Callable␤»
perl6/doc
…/Dateish.pod6 :67:
say $dt.formatter.^name; # OUTPUT: «Sub␤»
perl6/doc
…/Dateish.pod6 :68:
say $dt; # OUTPUT: «12/31/2015␤»
perl6/doc
…/Dateish.pod6 :78:
say DateTime.new(:year<2016>).is-leap-year; # OUTPUT: «True␤»
perl6/doc
…/Dateish.pod6 :79:
say Date.new("1900-01-01").is-leap-year; # OUTPUT: «False␤»
perl6/doc
…/Dateish.pod6 :90:
say Date.new('2015-12-31').day-of-month; # OUTPUT: «31␤»
perl6/doc
…/Dateish.pod6 :91:
say DateTime.new(date => Date.new('2015-12-24'), hour => 1).day-of-month; # OUTPUT: «24␤»
perl6/doc
…/Dateish.pod6 :101:
say Date.new('2015-12-31').day-of-week; # OUTPUT: «4␤»
perl6/doc
…/Dateish.pod6 :102:
say DateTime.new(date => Date.new('2015-12-24'), hour => 1).day-of-week; # OUTPUT: «4␤»
perl6/doc
…/Dateish.pod6 :112:
say Date.new('2015-12-31').day-of-year; # OUTPUT: «365␤»
perl6/doc
…/Dateish.pod6 :113:
say DateTime.new(date => Date.new('2015-03-24'), hour => 1).day-of-year; # OUTPUT: «83␤»
perl6/doc
…/Dateish.pod6 :123:
say Date.new("2016-01-02").days-in-month; # OUTPUT: «31␤»
perl6/doc
…/Dateish.pod6 :124:
say DateTime.new(:year<10000>, :month<2>).days-in-month; # OUTPUT: «29␤»
perl6/doc
…/Dateish.pod6 :136:
say $year; # OUTPUT: «2015␤»
perl6/doc
…/Dateish.pod6 :137:
say $week; # OUTPUT: «1␤»
perl6/doc
…/Dateish.pod6 :138:
say Date.new('2015-01-31').week; # OUTPUT: «(2015 5)␤»
perl6/doc
…/Dateish.pod6 :189:
say Date.new("2015-11-15").yyyy-mm-dd; # OUTPUT: «2015-11-15␤»
perl6/doc
…/Dateish.pod6 :190:
say DateTime.new(1470853583).yyyy-mm-dd; # OUTPUT: «2016-08-10␤»
perl6/doc
…/Dateish.pod6 :205:
say Date.new('1995-09-27').daycount; # OUTPUT: «49987␤»
perl6/doc
…/Dateish.pod6 :216:
Date.today.IO.say; # OUTPUT: «"2016-10-03".IO␤»
perl6/doc
…/Dateish.pod6 :217:
DateTime.now.IO.say; # OUTPUT: «"2016-10-03T11:14:47.977994-04:00".IO␤»
perl6/doc
…/Exception.pod6 :39:
say $!.message; # OUTPUT: «Something bad happened.␤»
perl6/doc
…/Exception.pod6 :127:
# OUTPUT: «This exception is pretty bad
perl6/doc
…/Failure.pod6 :40:
# OUTPUT: «X::AdHoc: 2017-09-10T11:56:05.477237ZWELP‼␤»
perl6/doc
…/Failure.pod6 :50:
sub f() { fail }; my $v = f; say $v.handled; # OUTPUT: «False␤»
perl6/doc
…/Failure.pod6 :58:
say $v.handled; # OUTPUT: «True␤»
perl6/doc
…/Failure.pod6 :72:
# OUTPUT: «X::AdHoc: Failed␤»
perl6/doc
…/Failure.pod6 :82:
L<Mu> type L«provides C<.self>
perl6/doc
…/Failure.pod6 :96:
say $stuff.self; # OUTPUT: «(HANDLED) Cannot convert string to number…»
perl6/doc
…/Failure.pod6 :108:
# OUTPUT: «False␤
perl6/doc
…/Failure.pod6 :120:
sub f() { fail }; my $v = f; say $v.defined; # OUTPUT: «False␤»
perl6/doc
…/Grammar.pod6 :19:
say Thingy ~~ Grammar; # OUTPUT: «True␤»
perl6/doc
…/Grammar.pod6 :21:
say so $match; # OUTPUT: «True␤»
perl6/doc
…/Grammar.pod6 :22:
say ~$match<a>; # OUTPUT: «a␤»
perl6/doc
…/Grammar.pod6 :122:
say ~$match; # OUTPUT: «aaa␤»
perl6/doc
…/Grammar.pod6 :123:
say $match.to; # OUTPUT: «3␤»
perl6/doc
…/Hash.pod6 :18:
# OUTPUT: «("/home/camelia", "/usr/bin:/sbin:/bin")␤»
perl6/doc
…/Hash.pod6 :25:
# OUTPUT: «("round", "bendy")␤»
perl6/doc
…/Hash.pod6 :27:
dd %h«oranges "$fruit"»;
perl6/doc
…/Hash.pod6 :28:
# OUTPUT: «("round", "bendy")␤»
perl6/doc
…/Hash.pod6 :54:
say %h<a>.^name; # OUTPUT: «Pair␤»
perl6/doc
…/Hash.pod6 :55:
say %h<a>.key; # OUTPUT: «b␤»
perl6/doc
…/Hash.pod6 :61:
say %h<a>; # OUTPUT: «2␤»
perl6/doc
…/Hash.pod6 :67:
say $h.^name; # OUTPUT: «Hash␤»
perl6/doc
…/Hash.pod6 :68:
say $h<a>; # OUTPUT: «1␤»
perl6/doc
…/Hash.pod6 :91:
say $query.^name; # OUTPUT: «Hash␤»
perl6/doc
…/Hash.pod6 :95:
say $query2.^name; # OUTPUT: «Block␤»
perl6/doc
…/Hash.pod6 :99:
# OUTPUT: «X::AdHoc: Type Block does not support associative indexing.␤»
perl6/doc
…/Hash.pod6 :111:
my %h; %h<a b c> = 2 xx *; %h.perl.say; # OUTPUT: «{:a(2), :b(2), :c(2)}␤»
perl6/doc
…/Hash.pod6 :112:
my %h; %h<a b c> = ^3; %h.perl.say; # OUTPUT: «{:a(0), :b(1), :c(2)}␤»
perl6/doc
…/Hash.pod6 :243:
say ($first-instant, $second-instant) ~~ %intervals.keys; # OUTPUT: «False␤»
perl6/doc
…/Hash.pod6 :244:
say ($first-instant, $second-instant) ~~ %intervals.keys.sort; # OUTPUT: «False␤»
perl6/doc
…/Hash.pod6 :245:
say ($first-instant, $second-instant) === %intervals.keys.sort; # OUTPUT: «False␤»
perl6/doc
…/Hash.pod6 :246:
say $first-instant === %intervals.keys.sort[0]; # OUTPUT: «True␤»
perl6/doc
…/Hash.pod6 :272:
# OUTPUT: «hitchhikers => 42, illuminatus => 23»
perl6/doc
…/Hash.pod6 :275:
# OUTPUT: «X::AdHoc: Cannot assign to a readonly variable or a value␤»
perl6/doc
…/Hash.pod6 :300:
Populates a L«C<Hash>
perl6/doc
…/Hash.pod6 :302:
altering the values using the C<:&as> L«C<Callable>
perl6/doc
…/Hash.pod6 :305:
The mapper can be a L«C<Callable>
perl6/doc
…/Hash.pod6 :306:
an L«C<Associative>
perl6/doc
…/Hash.pod6 :307:
With L«C<Associative>
perl6/doc
…/Hash.pod6 :309:
value respectively. A L«C<Callable>
perl6/doc
…/Hash.pod6 :319:
# OUTPUT: «{even => [0 2 4 6 8], odd => [1 3 5 7 9]}␤»
perl6/doc
…/Hash.pod6 :324:
# OUTPUT: «{foo => bar, four => [4 4], one => [1], three => [3], two => [2]}␤»
perl6/doc
…/Hash.pod6 :326:
The mapper's value is used as the key of the L«C<Hash>
perl6/doc
…/Hash.pod6 :327:
which the C<@list>'s item will be L«C<push>ed
perl6/doc
…/Hash.pod6 :328:
L«C<.categorize-list>
perl6/doc
…/Hash.pod6 :334:
L«C<Iterable>
perl6/doc
…/Hash.pod6 :355:
B<NOTE:> each of those L«C<Iterables>
perl6/doc
…/Hash.pod6 :362:
If C<:&as> L«C<Callable>
perl6/doc
…/Hash.pod6 :381:
Populates a L«C<Hash>
perl6/doc
…/Hash.pod6 :383:
altering the values using the C<:&as> L«C<Callable>
perl6/doc
…/Hash.pod6 :386:
The mapper can be a L«C<Callable>
perl6/doc
…/Hash.pod6 :387:
an L«C<Associative>
perl6/doc
…/Hash.pod6 :388:
With L«C<Associative>
perl6/doc
…/Hash.pod6 :390:
value respectively. A L«C<Callable>
perl6/doc
…/Hash.pod6 :397:
non-L«C<Iterables>
perl6/doc
…/Hash.pod6 :451:
B<NOTE:> each of category L«C<Iterables>
perl6/doc
…/Hash.pod6 :458:
If C<:&as> L«C<Callable>
perl6/doc
…/Hash.pod6 :504:
# OUTPUT: «{}␤»
perl6/doc
…/Hash.pod6 :512:
say %inv; # OUTPUT: «{322 => pair, 323 => [pipe hash]}␤»
perl6/doc
…/Hash.pod6 :519:
B<Note:> Compared to L«C<append>
perl6/doc
…/Hash.pod6 :520:
value as is, whereas C<append> will L«C<slip>
perl6/doc
…/Hash.pod6 :523:
say %ha; # OUTPUT: «{a => [42 (a b c a)]}␤»
perl6/doc
…/Hash.pod6 :526:
say %hb; # OUTPUT: «{a => [42 a b c a]}␤»
perl6/doc
…/Hash.pod6 :544:
# OUTPUT: «{a => 1, b => 2, c => 3, d => 4}␤»
perl6/doc
…/Hash.pod6 :546:
# OUTPUT: «{{a => [1 2], b => 2, c => 3, d => 4}␤»
perl6/doc
…/Hash.pod6 :548:
B<Note:> Compared to L«C<push>
perl6/doc
…/Hash.pod6 :549:
L«C<slip>
perl6/doc
…/Hash.pod6 :553:
say %hb; # OUTPUT: «{a => [42 a b c a]}␤»
perl6/doc
…/Hash.pod6 :556:
say %ha; # OUTPUT: «{a => [42 (a b c a)]}␤»
perl6/doc
…/Hash.pod6 :571:
say %h1.default; # OUTPUT: «(Any)␤»
perl6/doc
…/Hash.pod6 :572:
say %h1{'bananas'}; # OUTPUT: «(Any)␤»
perl6/doc
…/Hash.pod6 :575:
say %h2.default; # OUTPUT: «1␤»
perl6/doc
…/Hash.pod6 :576:
say %h2{'apples'} + %h2{'bananas'}; # OUTPUT: «4␤»
perl6/doc
…/Hash.pod6 :590:
say %h1.keyof; # OUTPUT: «(Str(Any))␤»
perl6/doc
…/Hash.pod6 :596:
# OUTPUT: «X::TypeCheck::Binding: Type check failed in binding to key; expected Str but got Int (3)␤»
perl6/doc
…/Hash.pod6 :609:
say %h1.of; # OUTPUT: «(Mu)␤»
perl6/doc
…/Hash.pod6 :612:
say %h2.of; # OUTPUT: «(Int)␤»
perl6/doc
…/Hash.pod6 :624:
say %a.dynamic; # OUTPUT: «False␤»
perl6/doc
…/Hash.pod6 :627:
say %b.dynamic; # OUTPUT: «True␤»
perl6/doc
…/Hash.pod6 :632:
say %*b.dynamic; # OUTPUT: «True␤»
perl6/doc
…/Hash.pod6 :638:
say $s.dynamic; # OUTPUT: «False␤» (wrong, don't do this)
perl6/doc
…/Hash.pod6 :639:
say $s.VAR.dynamic; # OUTPUT: «True␤» (correct approach)
perl6/doc
…/Hash.pod6 :650:
say %h<a>:exists; # OUTPUT: «True␤»
perl6/doc
…/Hash.pod6 :651:
say %h<a b>:exists; # OUTPUT: «(True True)␤»
perl6/doc
…/Hash.pod6 :667:
say %h<a>:p; # OUTPUT: «a => 1␤»
perl6/doc
…/Hash.pod6 :668:
say %h<a b>:p; # OUTPUT: «(a => 1 b=> 2)␤»
perl6/doc
…/Hash.pod6 :675:
say %h<a>:k; # OUTPUT: «a␤»
perl6/doc
…/Hash.pod6 :676:
say %h<a b>:k; # OUTPUT: «(a b)␤»
perl6/doc
…/Hash.pod6 :683:
say %h1<>:k; # OUTPUT: «(a)␤»
perl6/doc
…/Hash.pod6 :684:
say %h1<>:v; # OUTPUT: «(1)␤»
perl6/doc
…/Hash.pod6 :685:
say %h2<>:k; # OUTPUT: «(a b)␤»
perl6/doc
…/Hash.pod6 :686:
say %h2<>:v; # OUTPUT: «(1 2)␤»
perl6/doc
…/IO.pod6 :22:
L«C<&*chdir>
perl6/doc
…/IO.pod6 :24:
Returns L«C<IO::Path>
perl6/doc
…/IO.pod6 :26:
L«C<Failure>
perl6/doc
…/IO.pod6 :28:
L«C<IO::Path>
perl6/doc
…/IO.pod6 :30:
=item C<:d> — check L«C<.d>
perl6/doc
…/IO.pod6 :32:
=item C<:r> — check L«C<.r>
perl6/doc
…/IO.pod6 :34:
=item C<:w> — check L«C<.w>
perl6/doc
…/IO.pod6 :36:
=item C<:x> — check L«C<.x>
perl6/doc
…/IO.pod6 :51:
Use L«C<indir>
perl6/doc
…/IO.pod6 :62:
L«C<$path.absolute>
perl6/doc
…/IO.pod6 :63:
you want to use L«C<chdir>
perl6/doc
…/IO.pod6 :65:
Returns L«C<IO::Path>
perl6/doc
…/IO.pod6 :67:
L«C<Failure>
perl6/doc
…/IO.pod6 :69:
L«C<IO::Path>
perl6/doc
…/IO.pod6 :71:
Note that unlike regular L«C<chdir>
perl6/doc
…/IO.pod6 :84:
Use the following, instead; or see L«C<indir>
perl6/doc
…/IO.pod6 :97:
Coerces all C<@filenames> to L«C<IO::Path>
perl6/doc
…/IO.pod6 :98:
L«C<IO::Path.chmod>
perl6/doc
…/IO.pod6 :99:
Returns a L«C<List>
perl6/doc
…/IO.pod6 :110:
Takes L«C<Callable>
perl6/doc
…/IO.pod6 :115:
current directory (see L«C<&*chdir>
perl6/doc
…/IO.pod6 :120:
change C<$*CWD>, returns L«C<Failure>
perl6/doc
…/IO.pod6 :129:
})».CWD; # OUTPUT: «(/home/camelia)␤»
perl6/doc
…/IO.pod6 :133:
})».CWD; # OUTPUT: «(/tmp)␤»
perl6/doc
…/IO.pod6 :138:
})».CWD; # OUTPUT: «(/tmp)␤»
perl6/doc
…/IO.pod6 :141:
returns an L«C<IO::Path>
perl6/doc
…/IO.pod6 :144:
=item C<:d> — check L«C<.d>
perl6/doc
…/IO.pod6 :146:
=item C<:r> — check L«C<.r>
perl6/doc
…/IO.pod6 :148:
=item C<:w> — check L«C<.w>
perl6/doc
…/IO.pod6 :150:
=item C<:x> — check L«C<.x>
perl6/doc
…/IO.pod6 :154:
say $*CWD; # OUTPUT: «"/home/camelia".IO␤»
perl6/doc
…/IO.pod6 :155:
indir '/tmp', { say $*CWD }; # OUTPUT: «"/tmp".IO␤»
perl6/doc
…/IO.pod6 :156:
say $*CWD; # OUTPUT: «"/home/camelia".IO␤»
perl6/doc
…/IO.pod6 :167:
L«C<$*OUT>
perl6/doc
…/IO.pod6 :169:
L«C<.Str> method
perl6/doc
…/IO.pod6 :171:
print "Hi there!\n"; # OUTPUT: «Hi there!␤»
perl6/doc
…/IO.pod6 :172:
print "Hi there!"; # OUTPUT: «Hi there!»
perl6/doc
…/IO.pod6 :173:
print [1, 2, 3]; # OUTPUT: «1 2 3»
perl6/doc
…/IO.pod6 :175:
To print text and include the trailing newline, use L«C<put>
perl6/doc
…/IO.pod6 :183:
Same as L«C<print>
perl6/doc
…/IO.pod6 :184:
L«C<$*OUT.nl-out>
perl6/doc
…/IO.pod6 :187:
put "Hi there!\n"; # OUTPUT: «Hi there!␤␤»
perl6/doc
…/IO.pod6 :188:
put "Hi there!"; # OUTPUT: «Hi there!␤»
perl6/doc
…/IO.pod6 :189:
put [1, 2, 3]; # OUTPUT: «1 2 3␤»
perl6/doc
…/IO.pod6 :197:
Prints the "gist" of given objects. Same as L«C<put>
perl6/doc
…/IO.pod6 :198:
coerces non-L<Str> arguments using L«C<.gist>
perl6/doc
…/IO.pod6 :200:
B<NOTE:> the L«C<.gist>
perl6/doc
…/IO.pod6 :203:
you most likely want to use L«C<put>
perl6/doc
…/IO.pod6 :205:
say Range; # OUTPUT: «(Range)␤»
perl6/doc
…/IO.pod6 :206:
say class Foo {}; # OUTPUT: «(Foo)␤»
perl6/doc
…/IO.pod6 :207:
say 'I ♥ Perl6'; # OUTPUT: «I ♥ Perl6␤»
perl6/doc
…/IO.pod6 :208:
say 1..Inf; # OUTPUT: «1..Inf␤»
perl6/doc
…/IO.pod6 :219:
Like L«C<say>
perl6/doc
…/IO.pod6 :223:
note; # STDERR OUTPUT: «Noted␤»
perl6/doc
…/IO.pod6 :224:
note 'foo'; # STDERR OUTPUT: «foo␤»
perl6/doc
…/IO.pod6 :225:
note 1..*; # STDERR OUTPUT: «1..Inf␤»
perl6/doc
…/IO.pod6 :249:
L«C<IO::Handle.open>
perl6/doc
…/IO.pod6 :265:
# OUTPUT: «I ♥ Perl␤»
perl6/doc
…/IO.pod6 :293:
L«C<IO::Path>
perl6/doc
…/IO.pod6 :327:
say slurp 'file-that-already-exists'; # OUTPUT: «some text new text␤»
perl6/doc
…/IO.pod6 :331:
# OUTPUT: «Failed to open file /home/camelia/file-that-already-exists: file already exists …»
perl6/doc
…/IO.pod6 :348:
with $proc.out { say .get; .close } # OUTPUT: «Perl 6 is Great!␤»
perl6/doc
…/IO.pod6 :349:
with $proc.err { say .get; .close } # OUTPUT: «Nil␤»
perl6/doc
…/CatHandle.pod6 :36:
L«C<open>
perl6/doc
…/CatHandle.pod6 :43:
See L«C<.on-switch> method
perl6/doc
…/CatHandle.pod6 :46:
The L«C<:$encoding>
perl6/doc
…/CatHandle.pod6 :48:
L«C<IO::Handle.encoding>
perl6/doc
…/CatHandle.pod6 :72:
(.get xx 2).perl.say; # OUTPUT: «("A", "B").Seq␤»
perl6/doc
…/CatHandle.pod6 :75:
(.get xx 3).perl.say; # OUTPUT: «("C\n", "D\n", "E\n").Seq␤»
perl6/doc
…/CatHandle.pod6 :97:
(.get xx 2).perl.say; # OUTPUT: «("A", "B").Seq␤»
perl6/doc
…/CatHandle.pod6 :100:
(.get xx 3).perl.say; # OUTPUT: «("C", "D", "E").Seq␤»
perl6/doc
…/CatHandle.pod6 :131:
L«C<Str.comb>
perl6/doc
…/CatHandle.pod6 :139:
# OUTPUT: «("fo", "ob", "ar").Seq␤»
perl6/doc
…/CatHandle.pod6 :148:
Calls L«C<.close>
perl6/doc
…/CatHandle.pod6 :161:
L«C<IO::Handle.encoding>
perl6/doc
…/CatHandle.pod6 :170:
.readchars(5).say; # OUTPUT: «I ♥ P␤»
perl6/doc
…/CatHandle.pod6 :173:
.slurp.say; # OUTPUT: «Buf[uint8]:0x<72 6c 6d 65 6f 77>␤»
perl6/doc
…/CatHandle.pod6 :186:
L«C<.on-switch>
perl6/doc
…/CatHandle.pod6 :194:
# OUTPUT: «SWITCH! »
perl6/doc
…/CatHandle.pod6 :195:
.eof.say; # OUTPUT: «False␤»
perl6/doc
…/CatHandle.pod6 :197:
.eof.say; # OUTPUT: «SWITCH! False␤»
perl6/doc
…/CatHandle.pod6 :199:
.slurp; # OUTPUT: «SWITCH! »
perl6/doc
…/CatHandle.pod6 :200:
.eof.say; # OUTPUT: «True␤»
perl6/doc
…/CatHandle.pod6 :212:
L«C<$.nl-in> attribute
perl6/doc
…/CatHandle.pod6 :213:
from the line if L«C<$.chomp> attribute
perl6/doc
…/CatHandle.pod6 :223:
.say while $_ = $cat.get; # OUTPUT: «a␤b␤c␤d␤e␤»
perl6/doc
…/CatHandle.pod6 :233:
the caveats described in L«C<IO::Handle.getc>
perl6/doc
…/CatHandle.pod6 :243:
.say while $_ = $cat.getc; # OUTPUT: «I␤ ␤♥␤ ␤P␤e␤r␤l␤m␤e␤o␤w␤»
perl6/doc
…/CatHandle.pod6 :252:
Alias for L«C<.path>
perl6/doc
…/CatHandle.pod6 :260:
Same as L«C<IO::Handle.lines>
perl6/doc
…/CatHandle.pod6 :267:
# OUTPUT: «("foo", "bar", "meow").Seq␤»
perl6/doc
…/CatHandle.pod6 :276:
Same as L«C<IO::Handle.lock>
perl6/doc
…/CatHandle.pod6 :281:
L«C<.on-switch>
perl6/doc
…/CatHandle.pod6 :291:
Returns the L«native-descriptor
perl6/doc
…/CatHandle.pod6 :305:
# OUTPUT: «13␤13␤9␤»
perl6/doc
…/CatHandle.pod6 :317:
L«C<.new>
perl6/doc
…/CatHandle.pod6 :322:
L«C<$.nl-in>
perl6/doc
…/CatHandle.pod6 :323:
L«C<$.chomp>
perl6/doc
…/CatHandle.pod6 :324:
L«C<$.encoding>
perl6/doc
…/CatHandle.pod6 :330:
L«C<.on-switch>
perl6/doc
…/CatHandle.pod6 :369:
L«C<.new>
perl6/doc
…/CatHandle.pod6 :371:
L«C<.count>
perl6/doc
…/CatHandle.pod6 :372:
called each time L«C<.next-handle>
perl6/doc
…/CatHandle.pod6 :373:
is called, which happens once during L«C<.new>
perl6/doc
…/CatHandle.pod6 :375:
queue, or when the L«C<.next-handle>
perl6/doc
…/CatHandle.pod6 :378:
If the L«C<.count>
perl6/doc
…/CatHandle.pod6 :412:
$cat.lines.perl.say; # OUTPUT: «("", "B", "C", "", "E").Seq␤»
perl6/doc
…/CatHandle.pod6 :413:
@old-stuff.perl.say; # OUTPUT: «["A\nB\nC", "D\nE"]␤»
perl6/doc
…/CatHandle.pod6 :435:
say IO::CatHandle.new .opened; # OUTPUT: «False␤»
perl6/doc
…/CatHandle.pod6 :436:
say IO::CatHandle.new($*IN).opened; # OUTPUT: «True␤»
perl6/doc
…/CatHandle.pod6 :440:
.opened.say; # OUTPUT: «True␤»
perl6/doc
…/CatHandle.pod6 :442:
.opened.say; # OUTPUT: «False␤»
perl6/doc
…/CatHandle.pod6 :452:
Returns the value of L«C<.path> attribute
perl6/doc
…/CatHandle.pod6 :488:
say .read: 2; # OUTPUT: «Buf[uint8]:0x<6d 65>␤»
perl6/doc
…/CatHandle.pod6 :489:
say .read: 2000; # OUTPUT: «Buf[uint8]:0x<6f 77 04 05 06>␤»
perl6/doc
…/CatHandle.pod6 :494:
say .get; # OUTPUT: «meow␤»
perl6/doc
…/CatHandle.pod6 :495:
say .read: 2000; # OUTPUT: «Buf[uint8]:0x<04 05 06>␤»
perl6/doc
…/CatHandle.pod6 :516:
say .readchars: 11; # OUTPUT: «Perl loves ␤»
perl6/doc
…/CatHandle.pod6 :517:
say .readchars: 1000; # OUTPUT: «to meow␤»
perl6/doc
…/CatHandle.pod6 :527:
Calls L«C<.seek>
perl6/doc
…/CatHandle.pod6 :535:
L«C<.next-handle>
perl6/doc
…/CatHandle.pod6 :543:
.get.say; # OUTPUT: «foo␤»
perl6/doc
…/CatHandle.pod6 :545:
.readchars(2).say; # OUTPUT: «oo␤»
perl6/doc
…/CatHandle.pod6 :547:
.readchars(3).say; # OUTPUT: «bar␤»
perl6/doc
…/CatHandle.pod6 :549:
say ~$!; # OUTPUT: «Failed to seek in filehandle: 22␤»
perl6/doc
…/CatHandle.pod6 :559:
Calls L«C<.tell>
perl6/doc
…/CatHandle.pod6 :568:
.get.say; # OUTPUT: «foo␤»
perl6/doc
…/CatHandle.pod6 :569:
.tell.say; # OUTPUT: «3␤»
perl6/doc
…/CatHandle.pod6 :571:
.tell.say; # OUTPUT: «1␤»
perl6/doc
…/CatHandle.pod6 :572:
say .readchars: 3; # OUTPUT: «oob␤»
perl6/doc
…/CatHandle.pod6 :573:
.tell.say; # OUTPUT: «2␤»
perl6/doc
…/CatHandle.pod6 :593:
IO::CatHandle.new( $f1, $f2).slurp.say; # OUTPUT: «foobar␤»
perl6/doc
…/CatHandle.pod6 :594:
IO::CatHandle.new(:bin, $f1, $f2).slurp.say; # OUTPUT: «Buf[uint8]:0x<66 6f 6f 62 61 72>␤»
perl6/doc
…/CatHandle.pod6 :595:
IO::CatHandle.new .slurp.say; # OUTPUT: «Nil␤»
perl6/doc
…/CatHandle.pod6 :605:
L«C<Str.split>
perl6/doc
…/CatHandle.pod6 :613:
# OUTPUT: «("f", "bar").Seq␤»
perl6/doc
…/CatHandle.pod6 :622:
Calls L«C<.Str>
perl6/doc
…/CatHandle.pod6 :625:
an implementation-defined string (C«'<closed IO::CatHandle>'» in Rakudo).
perl6/doc
…/CatHandle.pod6 :634:
L«C<.read>
perl6/doc
…/CatHandle.pod6 :636:
L«C<.readchars>
perl6/doc
…/CatHandle.pod6 :644:
# OUTPUT: «fo␤ob␤ar␤»
perl6/doc
…/CatHandle.pod6 :647:
# OUTPUT: «Buf[uint8]:0x<66 6f>␤Buf[uint8]:0x<6f 62>␤Buf[uint8]:0x<61 72>␤»
perl6/doc
…/CatHandle.pod6 :656:
Calls L«C<.t>
perl6/doc
…/CatHandle.pod6 :664:
repeat { .t.say } while .next-handle; # OUTPUT: «False␤True␤»
perl6/doc
…/CatHandle.pod6 :674:
Same as L«C<IO::Handle.unlock>
perl6/doc
…/CatHandle.pod6 :679:
L«C<.on-switch>
perl6/doc
…/CatHandle.pod6 :689:
Same as L«C<IO::Handle.words>
perl6/doc
…/CatHandle.pod6 :697:
# OUTPUT: «("foo", "bar", "meow").Seq␤»
perl6/doc
…/Handle.pod6 :29:
of L«C<:$chomp>
perl6/doc
…/Handle.pod6 :30:
L«C<:$nl-in>
perl6/doc
…/Handle.pod6 :31:
L«C<:$nl-out>
perl6/doc
…/Handle.pod6 :32:
L«C<:$enc>
perl6/doc
…/Handle.pod6 :116:
L«C<Str.comb>
perl6/doc
…/Handle.pod6 :136:
(as defined by L«C<.nl-in>
perl6/doc
…/Handle.pod6 :137:
from content when using L«C<.get>
perl6/doc
…/Handle.pod6 :138:
L«C<.lines>
perl6/doc
…/Handle.pod6 :148:
characters (as set by L«C<.nl-in>
perl6/doc
…/Handle.pod6 :151:
L«C<$*ARGFILES>
perl6/doc
…/Handle.pod6 :178:
defaults to L«C<$*ARGFILES>
perl6/doc
…/Handle.pod6 :223:
L«C<.path>
perl6/doc
…/Handle.pod6 :224:
and whether it is L«C<.opened>
perl6/doc
…/Handle.pod6 :279:
$fh.get.say; # OUTPUT: «First line is text, then:␤»
perl6/doc
…/Handle.pod6 :281:
$fh.slurp.say; # OUTPUT: «Buf[uint8]:0x<42 69 6e 61 72 79>␤»
perl6/doc
…/Handle.pod6 :293:
chunks delineated by L«C<.nl-in>
perl6/doc
…/Handle.pod6 :294:
handle's L«C<.chomp>
perl6/doc
…/Handle.pod6 :295:
then characters specified by L«C<.nl-in>
perl6/doc
…/Handle.pod6 :302:
L«C<$*ARGFILES>
perl6/doc
…/Handle.pod6 :318:
# OUTPUT: «The file contains 72 lines that mention Perl␤»
perl6/doc
…/Handle.pod6 :328:
will L«C<fail>
perl6/doc
…/Handle.pod6 :331:
exclusive (write) lock. On success, returns C<True>; L«fails
perl6/doc
…/Handle.pod6 :337:
To remove a lock, L«C<close>
perl6/doc
…/Handle.pod6 :338:
L«C<unlock>
perl6/doc
…/Handle.pod6 :354:
.slurp.say; # OUTPUT: «I ♥ Perl 6!␤»
perl6/doc
…/Handle.pod6 :365:
Removes a L«C<lock>
perl6/doc
…/Handle.pod6 :374:
Similar to L«C<Str.words>
perl6/doc
…/Handle.pod6 :382:
L«C<$*ARGFILES>
perl6/doc
…/Handle.pod6 :406:
L«C<Str.split>
perl6/doc
…/Handle.pod6 :426:
if C<$close> is C<True>. For L«C<Cool>
perl6/doc
…/Handle.pod6 :427:
encoding the handle is set to use (L«C<IO::Handle.open>
perl6/doc
…/Handle.pod6 :428:
or L«C<IO::Handle.encoding>
perl6/doc
…/Handle.pod6 :430:
Behaviour for spurting a L«C<Cool>
perl6/doc
…/Handle.pod6 :431:
mode or spurting a L«C<Blob>
perl6/doc
…/Handle.pod6 :441:
to L<Str> by calling L«C<.Str>
perl6/doc
…/Handle.pod6 :498:
to L<Str> by calling L«C<.Str>
perl6/doc
…/Handle.pod6 :499:
value of L«C<.nl-out>
perl6/doc
…/Handle.pod6 :517:
that it stringifies its arguments by calling L«C<.gist>
perl6/doc
…/Handle.pod6 :518:
of L«C<.Str>
perl6/doc
…/Handle.pod6 :526:
$fh.say(Complex.new(3, 4)); # RESULT: «3+4i\n»
perl6/doc
…/Handle.pod6 :544:
say .read: 6; # OUTPUT: «Buf[uint8]:0x<49 20 e2 99 a5 20>␤»
perl6/doc
…/Handle.pod6 :565:
say .readchars: 5; # OUTPUT: «I ♥ P␤»
perl6/doc
…/Handle.pod6 :619:
not use it for new code. Use L«C<.slurp> method
perl6/doc
…/Handle.pod6 :635:
the content using invocant's current L«C<.encoding>
perl6/doc
…/Handle.pod6 :650:
The chunks will be L«C<Buf>
perl6/doc
…/Handle.pod6 :651:
or, if it isn't, L«C<Str>
perl6/doc
…/Handle.pod6 :677:
L«C<$*IN>
perl6/doc
…/Handle.pod6 :678:
L«C<$*OUT>
perl6/doc
…/Handle.pod6 :679:
L«C<$*ERR>
perl6/doc
…/Handle.pod6 :688:
Alias for L«C<.path>
perl6/doc
…/Handle.pod6 :692:
Returns the value of L«C<.path>
perl6/doc
…/Handle.pod6 :696:
say "foo".IO.open.path; # OUTPUT: «"foo".IO␤»
perl6/doc
…/Handle.pod6 :711:
It's a common idiom to use L«C<LEAVE> phaser
perl6/doc
…/Handle.pod6 :765:
'foo'.IO.slurp.say; # (if the data got buffered) OUTPUT: «␤»
perl6/doc
…/Handle.pod6 :767:
'foo'.IO.slurp.say; # OUTPUT: «something␤»
perl6/doc
…/Handle.pod6 :791:
in routines that C<chomp>, such as L«C<get>
perl6/doc
…/Handle.pod6 :792:
L«C<lines>
perl6/doc
…/Handle.pod6 :811:
handle, to be used by methods L«C<.put>
perl6/doc
…/Handle.pod6 :812:
and L«C<.say>
perl6/doc
…/Handle.pod6 :822:
.slurp.perl.say; # OUTPUT: «"42\n42foo"»
perl6/doc
…/Path.pod6 :18:
(defaults to L«C<$*CWD>
perl6/doc
…/Path.pod6 :20:
the special L«C<IO::Spec>
perl6/doc
…/Path.pod6 :23:
L«C<$*SPEC>
perl6/doc
…/Path.pod6 :28:
of the specific SPEC modules: L«C<IO::Spec::Unix>
perl6/doc
…/Path.pod6 :29:
L«C<IO::Spec::Win32>
perl6/doc
…/Path.pod6 :30:
L«C<IO::Spec::Cygwin>
perl6/doc
…/Path.pod6 :31:
L«C<IO::Spec::QNX>
perl6/doc
…/Path.pod6 :32:
shortcut subclasses L«C<IO::Path::Unix>
perl6/doc
…/Path.pod6 :33:
L«C<IO::Path::Win32>
perl6/doc
…/Path.pod6 :34:
L«C<IO::Path::Cygwin>
perl6/doc
…/Path.pod6 :35:
L«C<IO::Path::QNX>
perl6/doc
…/Path.pod6 :59:
current L«C<$*SPEC>
perl6/doc
…/Path.pod6 :61:
L«C<$*CWD>
perl6/doc
…/Path.pod6 :66:
.IO.CWD.say; # OUTPUT: «/home/camelia␤»
perl6/doc
…/Path.pod6 :73:
.IO.SPEC.^name.say; # OUTPUT: «IO::Spec::Unix␤»
perl6/doc
…/Path.pod6 :79:
IO::Path.new("foo").path.say; # OUTPUT: «foo␤»
perl6/doc
…/Path.pod6 :84:
L«C<IO::Path.absolute>
perl6/doc
…/Path.pod6 :85:
and L«C<IO::Path.relative>
perl6/doc
…/Path.pod6 :99:
L«C<.absolute>
perl6/doc
…/Path.pod6 :121:
"docs/README.pod".IO.basename.say; # OUTPUT: «README.pod␤»
perl6/doc
…/Path.pod6 :122:
"/tmp/".IO.basename.say; # OUTPUT: «tmp␤»
perl6/doc
…/Path.pod6 :124:
Note that in L«C<IO::Spec::Win32>
perl6/doc
…/Path.pod6 :127:
IO::Path::Win32.new('//server/share').basename.say; # OUTPUT: «\␤»
perl6/doc
…/Path.pod6 :142:
"foo/bar".IO.add("meow") .resolve.relative.say; # OUTPUT: «foo/bar/meow␤»
perl6/doc
…/Path.pod6 :143:
"foo/bar".IO.add("/meow") .resolve.relative.say; # OUTPUT: «foo/bar/meow␤»
perl6/doc
…/Path.pod6 :144:
"foo/bar".IO.add("meow.txt").resolve.relative.say; # OUTPUT: «foo/bar/meow.txt␤»
perl6/doc
…/Path.pod6 :145:
"foo/bar".IO.add("../meow") .resolve.relative.say; # OUTPUT: «foo/meow␤»
perl6/doc
…/Path.pod6 :146:
"foo/bar".IO.add("../../") .resolve.relative.say; # OUTPUT: «.␤»
perl6/doc
…/Path.pod6 :154:
Alias for L«C<.add>
perl6/doc
…/Path.pod6 :157:
L«C<.add>
perl6/doc
…/Path.pod6 :169:
"foo/./././..////bar".IO.cleanup.say; # OUTPUT: «"foo/../bar".IO␤»
perl6/doc
…/Path.pod6 :171:
.cleanup.say; "foo\..\bar".IO; # OUTPUT: «"foo\..\bar".IO␤»
perl6/doc
…/Path.pod6 :174:
L«C<resolve>
perl6/doc
…/Path.pod6 :183:
L«C<Str.comb>
perl6/doc
…/Path.pod6 :193:
L«C<Str.split>
perl6/doc
…/Path.pod6 :214:
C<$parts> can be a L«C<Range>
perl6/doc
…/Path.pod6 :219:
L«C<Str>
perl6/doc
…/Path.pod6 :225:
the result of replacement the L«C<basename>
perl6/doc
…/Path.pod6 :229:
say "foo.tar.gz".IO.extension; # OUTPUT: «gz␤»
perl6/doc
…/Path.pod6 :230:
say "foo.tar.gz".IO.extension: :2parts; # OUTPUT: «tar.gz␤»
perl6/doc
…/Path.pod6 :231:
say "foo.tar.gz".IO.extension: :parts(^5); # OUTPUT: «tar.gz␤»
perl6/doc
…/Path.pod6 :232:
say "foo.tar.gz".IO.extension: :parts(0..1); # OUTPUT: «gz␤»
perl6/doc
…/Path.pod6 :235:
say "foo.tar.gz".IO.extension: ''; # OUTPUT: «"foo.tar".IO␤»
perl6/doc
…/Path.pod6 :236:
say "foo.tar.gz".IO.extension: 'ZIP'; # OUTPUT: «"foo.tar.ZIP".IO␤»
perl6/doc
…/Path.pod6 :237:
say "foo.tar.gz".IO.extension: 'ZIP', :0parts; # OUTPUT: «"foo.tar.gz.ZIP".IO␤»
perl6/doc
…/Path.pod6 :238:
say "foo.tar.gz".IO.extension: 'ZIP', :2parts; # OUTPUT: «"foo.ZIP".IO␤»
perl6/doc
…/Path.pod6 :239:
say "foo.tar.gz".IO.extension: 'ZIP', :parts(^5); # OUTPUT: «"foo.ZIP".IO␤»
perl6/doc
…/Path.pod6 :242:
say "foo.tar.gz".IO.extension: '', :joiner<_>; # OUTPUT: «"foo.tar_".IO␤»
perl6/doc
…/Path.pod6 :243:
say "foo.tar.gz".IO.extension: 'ZIP', :joiner<_>; # OUTPUT: «"foo.tar_ZIP".IO␤»
perl6/doc
…/Path.pod6 :245:
:2parts; # OUTPUT: «"foo_ZIP".IO␤»
perl6/doc
…/Path.pod6 :247:
:parts(^5); # OUTPUT: «"foo_ZIP".IO␤»
perl6/doc
…/Path.pod6 :252:
say "foo.tar.gz".IO.extension: :5parts; # OUTPUT: «␤»
perl6/doc
…/Path.pod6 :255:
say "foo.tar.gz".IO.extension: 'ZIP', :5parts; # OUTPUT: «"foo.tar.gz".IO␤»
perl6/doc
…/Path.pod6 :258:
say "foo.tar.gz".IO.extension: 'ZIP', :0parts; # OUTPUT: «"foo.tar.gz.ZIP".IO␤»
perl6/doc
…/Path.pod6 :261:
say "...".IO.extension: 'tar'; # OUTPUT: «"...tar".IO␤»
perl6/doc
…/Path.pod6 :264:
say "...".IO.extension: 'tar', :joiner(''); # OUTPUT: «"..tar".IO␤»
perl6/doc
…/Path.pod6 :267:
say ".".IO.extension: ''; # OUTPUT: «".".IO␤»
perl6/doc
…/Path.pod6 :279:
say IO::Path.new("/home/camelia/myfile.p6").dirname; # OUTPUT: «/home/camelia␤»
perl6/doc
…/Path.pod6 :280:
say IO::Path::Win32.new("C:/home/camelia").dirname; # OUTPUT: «/home␤»
perl6/doc
…/Path.pod6 :281:
say IO::Path.new("/home").dirname; # OUTPUT: «/␤»
perl6/doc
…/Path.pod6 :292:
say IO::Path::Win32.new("C:\\Windows\\registry.ini").volume; # OUTPUT: «C:␤»
perl6/doc
…/Path.pod6 :301:
are the same as available via methods L«C<.volume>
perl6/doc
…/Path.pod6 :302:
L«C<.dirname>
perl6/doc
…/Path.pod6 :306:
# OUTPUT: «Map.new((:basename("perl6.bat"),:dirname("/rakudo"),:volume("C:")))␤»
perl6/doc
…/Path.pod6 :314:
Returns a string that, when given passed through L«C<EVAL>
perl6/doc
…/Path.pod6 :321:
to L«C<$*CWD>
perl6/doc
…/Path.pod6 :331:
L«C<.absolute>
perl6/doc
…/Path.pod6 :332:
L«C<.path>
perl6/doc
…/Path.pod6 :336:
say "foo/bar".IO; # OUTPUT: «"foo/bar".IO␤»
perl6/doc
…/Path.pod6 :337:
say IO::Path::Win32.new: 「C:\foo/bar\」; # OUTPUT: «"C:\foo/bar\".IO␤»
perl6/doc
…/Path.pod6 :345:
Alias for L«C<IO::Path.path>
perl6/doc
…/Path.pod6 :347:
L«C<$.CWD> attribute
perl6/doc
…/Path.pod6 :348:
retaining full path information use L«C<.absolute>
perl6/doc
…/Path.pod6 :349:
L«C<.relative>
perl6/doc
…/Path.pod6 :358:
L«C<.basename>
perl6/doc
…/Path.pod6 :359:
L«C<Str.succ>
perl6/doc
…/Path.pod6 :361:
"foo/file02.txt".IO.succ.say; # OUTPUT: «"foo/file03.txt".IO␤»
perl6/doc
…/Path.pod6 :379:
L«C<.basename>
perl6/doc
…/Path.pod6 :380:
L«C<Str.pred>
perl6/doc
…/Path.pod6 :382:
"foo/file02.txt".IO.pred.say; # OUTPUT: «"foo/file01.txt".IO␤»
perl6/doc
…/Path.pod6 :391:
L«IO::Notification.watch-path
perl6/doc
…/Path.pod6 :402:
"/foo".IO.is-absolute.say; # OUTPUT: «True␤»
perl6/doc
…/Path.pod6 :403:
"bars".IO.is-absolute.say; # OUTPUT: «False␤»
perl6/doc
…/Path.pod6 :409:
IO::Path::Win32.new("/foo" ).is-absolute.say; # OUTPUT: «True␤»
perl6/doc
…/Path.pod6 :410:
IO::Path::Win32.new("C:/foo").is-absolute.say; # OUTPUT: «True␤»
perl6/doc
…/Path.pod6 :411:
IO::Path::Win32.new("C:foo" ).is-absolute.say; # OUTPUT: «False␤»
perl6/doc
…/Path.pod6 :420:
Windows caveats for L«C<.is-absolute>
perl6/doc
…/Path.pod6 :456:
'/etc/foo'.IO.parent.say; # OUTPUT: «"/etc".IO␤»
perl6/doc
…/Path.pod6 :457:
'/etc/..' .IO.parent.say; # OUTPUT: «"/etc".IO␤»
perl6/doc
…/Path.pod6 :458:
'/etc/../'.IO.parent.say; # OUTPUT: «"/etc".IO␤»
perl6/doc
…/Path.pod6 :459:
'./' .IO.parent.say; # OUTPUT: «"..".IO␤»
perl6/doc
…/Path.pod6 :460:
'foo' .IO.parent.say; # OUTPUT: «".".IO␤»
perl6/doc
…/Path.pod6 :461:
'/' .IO.parent.say; # OUTPUT: «"/".IO␤»
perl6/doc
…/Path.pod6 :462:
IO::Path::Win32.new('C:/').parent.say; # OUTPUT: «"C:/".IO␤»
perl6/doc
…/Path.pod6 :478:
method will L«C<fail>
perl6/doc
…/Path.pod6 :481:
L«C<cleanup>
perl6/doc
…/Path.pod6 :505:
L«C<IO::Dir> module
perl6/doc
…/Path.pod6 :558:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :568:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :571:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :581:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :584:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :595:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :598:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :608:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :611:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :621:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :624:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :634:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :637:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :647:
writable. The method will L«C<fail>
perl6/doc
…/Path.pod6 :650:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :660:
The method will L«C<fail>
perl6/doc
…/Path.pod6 :663:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :673:
readable, and writable. The method will L«C<fail>
perl6/doc
…/Path.pod6 :676:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :688:
is dependent on the operating system. The method will L«C<fail>
perl6/doc
…/Path.pod6 :692:
TIP: use L«smartmatch with Pairs
perl6/doc
…/Path.pod6 :702:
L«C<IO::Path>
perl6/doc
…/Path.pod6 :703:
L«C<.basename>
perl6/doc
…/Path.pod6 :705:
L«C<.add>
perl6/doc
…/Path.pod6 :707:
say '.bashrc'.IO.sibling: '.bash_aliases'; # OUTPUT: «.bash_aliases".IO␤»
perl6/doc
…/Path.pod6 :709:
# OUTPUT: «/home/camelia/.bash_aliases".IO␤»
perl6/doc
…/Path.pod6 :711:
say '/foo/' .IO.sibling: 'bar'; # OUTPUT: «/bar".IO␤»
perl6/doc
…/Path.pod6 :712:
say '/foo/.'.IO.sibling: 'bar'; # OUTPUT: «/foo/bar".IO␤»
perl6/doc
…/Path.pod6 :720:
Opens the invocant and returns its L«words
perl6/doc
…/Path.pod6 :724:
L«C<IO::Handle.open>
perl6/doc
…/Path.pod6 :725:
L«C<IO::Handle.words>
perl6/doc
…/Path.pod6 :733:
L«C<$limit> argument
perl6/doc
…/Path.pod6 :745:
Opens the invocant and returns its L«lines
perl6/doc
…/Path.pod6 :749:
L«C<IO::Handle.open>
perl6/doc
…/Path.pod6 :750:
L«C<IO::Handle.lines>
perl6/doc
…/Path.pod6 :758:
L«C<$limit> argument
perl6/doc
…/Path.pod6 :764:
# OUTPUT: «The file contains 72 lines that mention Perl␤»
perl6/doc
…/Path.pod6 :775:
to C<utf8>. See L«C<&open>
perl6/doc
…/Path.pod6 :784:
Will L«C<fail>
perl6/doc
…/Path.pod6 :785:
The C<$data> can be any L«C<Cool>
perl6/doc
…/Path.pod6 :789:
in L«C<IO::Handle.open>
perl6/doc
…/Path.pod6 :790:
is a L«C<Blob>
perl6/doc
…/Path.pod6 :795:
=item C<:$createonly> — L«C<fail>
perl6/doc
…/Path.pod6 :805:
L«C<add>
perl6/doc
…/Path.pod6 :806:
directory see L«C<&chdir>
perl6/doc
…/Path.pod6 :812:
C<:d>, C<:r>, C<:w>, or C<:x> L«C<Bool>
perl6/doc
…/Path.pod6 :813:
set to C<True>, they'll perform L«C<.d>
perl6/doc
…/Path.pod6 :814:
L«C<.w>
perl6/doc
…/Path.pod6 :824:
Creates a new directory. See L«C<mode>
perl6/doc
…/Path.pod6 :849:
To delete non-empty directory, see L«rmtree in C<File::Directory::Tree>
perl6/doc
…/Path.pod6 :890:
different storage device. See also: L«C<move>
perl6/doc
…/Path.pod6 :917:
To avoid copying, you can use L«C<rename>
perl6/doc
…/Path.pod6 :926:
Coerces L«C<.basename>
perl6/doc
…/Path.pod6 :935:
Coerces L«C<.basename>
perl6/doc
…/Path.pod6 :949:
To create a hard link, see L«C<link>
perl6/doc
…/Path.pod6 :964:
To create a symbolic link, see L«C<symlink>
perl6/doc
…/Path.pod6 :999:
say $io.SPEC; # OUTPUT: «(Unix)␤»
perl6/doc
…/Path.pod6 :1000:
say $io.SPEC.dir-sep; # OUTPUT: «/␤»
perl6/doc
…/Path.pod6 :1009:
Returns an L«C<Instant>
perl6/doc
…/Path.pod6 :1029:
Returns an L«C<Instant>
perl6/doc
…/Cygwin.pod6 :9:
This sub-class of L«C<IO::Path>
perl6/doc
…/Cygwin.pod6 :10:
L«C<IO::Spec::Cygwin>
perl6/doc
…/Cygwin.pod6 :16:
Same as L«C<IO::Path.new>
perl6/doc
…/Cygwin.pod6 :18:
L«C<IO::Spec::Cygwin>
perl6/doc
…/Cygwin.pod6 :27:
Returns a string that, when given passed through L«C<EVAL>
perl6/doc
…/Cygwin.pod6 :34:
to L«C<$*CWD>
perl6/doc
…/QNX.pod6 :9:
This sub-class of L«C<IO::Path>
perl6/doc
…/QNX.pod6 :10:
L«C<IO::Spec::QNX>
perl6/doc
…/QNX.pod6 :16:
Same as L«C<IO::Path.new>
perl6/doc
…/QNX.pod6 :18:
L«C<IO::Spec::QNX>
perl6/doc
…/QNX.pod6 :27:
Returns a string that, when given passed through L«C<EVAL>
perl6/doc
…/QNX.pod6 :34:
to L«C<$*CWD>
perl6/doc
…/Unix.pod6 :9:
This sub-class of L«C<IO::Path>
perl6/doc
…/Unix.pod6 :10:
L«C<IO::Spec::Unix>
perl6/doc
…/Unix.pod6 :16:
Same as L«C<IO::Path.new>
perl6/doc
…/Unix.pod6 :18:
L«C<IO::Spec::Unix>
perl6/doc
…/Unix.pod6 :27:
Returns a string that, when given passed through L«C<EVAL>
perl6/doc
…/Unix.pod6 :34:
to L«C<$*CWD>
perl6/doc
…/Win32.pod6 :9:
This sub-class of L«C<IO::Path>
perl6/doc
…/Win32.pod6 :10:
L«C<IO::Spec::Win32>
perl6/doc
…/Win32.pod6 :16:
Same as L«C<IO::Path.new>
perl6/doc
…/Win32.pod6 :18:
L«C<IO::Spec::Win32>
perl6/doc
…/Win32.pod6 :27:
Returns a string that, when given passed through L«C<EVAL>
perl6/doc
…/Win32.pod6 :34:
to L«C<$*CWD>
perl6/doc
…/Spec.pod6 :19:
need to use C<IO::Spec::*>. Use L«C<IO::Path>
perl6/doc
…/Spec.pod6 :23:
L«C<IO::Path>
perl6/doc
…/Cygwin.pod6 :14:
need to use C<IO::Spec::*>. Use L«C<IO::Path>
perl6/doc
…/Cygwin.pod6 :18:
L«C<IO::Path>
perl6/doc
…/Cygwin.pod6 :30:
Uses L«C<IO::Spec::Win32>
perl6/doc
…/Cygwin.pod6 :43:
# OUTPUT: «C:/foo/../bar/../ber␤»
perl6/doc
…/Cygwin.pod6 :46:
# OUTPUT: «foo/../bar/../ber␤»
perl6/doc
…/Cygwin.pod6 :49:
# OUTPUT: «ber␤»
perl6/doc
…/Cygwin.pod6 :58:
of the resultant path as a string. The C<@parts> are L«C<Str>
perl6/doc
…/Cygwin.pod6 :62:
# OUTPUT: «foo/bar/ber/perl␤»
perl6/doc
…/Cygwin.pod6 :70:
Same as L«C<IO::Spec::Win32.catpath>
perl6/doc
…/Cygwin.pod6 :74:
# OUTPUT: «C:/some/dir/foo.txt␤»
perl6/doc
…/Cygwin.pod6 :77:
# OUTPUT: «C:/some/dir␤»
perl6/doc
…/Cygwin.pod6 :80:
# OUTPUT: «/some/dir/foo.txt␤»
perl6/doc
…/Cygwin.pod6 :83:
# OUTPUT: «E:foo.txt␤»
perl6/doc
…/Cygwin.pod6 :95:
say IO::Spec::Cygwin.is-absolute: "/foo"; # OUTPUT: «True␤»
perl6/doc
…/Cygwin.pod6 :96:
say IO::Spec::Cygwin.is-absolute: "/\x[308]foo"; # OUTPUT: «True␤»
perl6/doc
…/Cygwin.pod6 :97:
say IO::Spec::Cygwin.is-absolute: 「C:\foo」; # OUTPUT: «True␤»
perl6/doc
…/Cygwin.pod6 :98:
say IO::Spec::Cygwin.is-absolute: "bar"; # OUTPUT: «False␤»
perl6/doc
…/Cygwin.pod6 :106:
Same as L«C<IO::Spec::Win32.join>
perl6/doc
…/Cygwin.pod6 :115:
Same as L«C<IO::Spec::Win32.rel2abs>
perl6/doc
…/Cygwin.pod6 :124:
Same as L«C<IO::Spec::Win32.split>
perl6/doc
…/Cygwin.pod6 :133:
Same as L«C<IO::Spec::Win32.splitpath>
perl6/doc
…/QNX.pod6 :14:
need to use C<IO::Spec::*>. Use L«C<IO::Path>
perl6/doc
…/QNX.pod6 :18:
L«C<IO::Path>
perl6/doc
…/QNX.pod6 :33:
# OUTPUT: «foo/../bar/../ber␤»
perl6/doc
…/QNX.pod6 :36:
# OUTPUT: «foo/../bar/../ber␤»
perl6/doc
…/QNX.pod6 :39:
# OUTPUT: «ber␤»
perl6/doc
…/Unix.pod6 :14:
need to use C<IO::Spec::*>. Use L«C<IO::Path>
perl6/doc
…/Unix.pod6 :18:
L«C<IO::Path>
perl6/doc
…/Unix.pod6 :40:
IO::Spec::Unix.basename("foo/bar/") .perl.say; # OUTPUT: «""␤»
perl6/doc
…/Unix.pod6 :41:
IO::Spec::Unix.basename("foo/bar/.").perl.say; # OUTPUT: «"."␤»
perl6/doc
…/Unix.pod6 :42:
IO::Spec::Unix.basename("foo/bar") .perl.say; # OUTPUT: «"bar"␤»
perl6/doc
…/Unix.pod6 :55:
# OUTPUT: «foo/../bar/../ber␤»
perl6/doc
…/Unix.pod6 :58:
# OUTPUT: «foo/../bar/../ber␤»
perl6/doc
…/Unix.pod6 :61:
# OUTPUT: «ber␤»
perl6/doc
…/Unix.pod6 :70:
of the resultant path as a string. The C<@parts> are L«C<Str>
perl6/doc
…/Unix.pod6 :73:
IO::Spec::Unix.catdir(<foo/bar ber perl>).say; # OUTPUT: «foo/bar/ber/perl␤»
perl6/doc
…/Unix.pod6 :77:
Alias for L«C<catdir>
perl6/doc
…/Unix.pod6 :91:
# OUTPUT: «some/dir/and/more␤»
perl6/doc
…/Unix.pod6 :101:
say '.' eq $*SPEC.curdir; # OUTPUT: «True␤»
perl6/doc
…/Unix.pod6 :109:
Returns a L«C<none>
perl6/doc
…/Unix.pod6 :114:
say @dirs.grep(* eq $*SPEC.curupdir); # OUTPUT: «(foo bar)␤»
perl6/doc
…/Unix.pod6 :137:
IO::Spec::Unix.dir-sep.say; # OUTPUT: «/␤»
perl6/doc
…/Unix.pod6 :142:
L«C<IO::Path.extension>
perl6/doc
…/Unix.pod6 :154:
$*SPEC.extension('foo.' ).perl.say; # OUTPUT: «""␤»
perl6/doc
…/Unix.pod6 :155:
$*SPEC.extension('foo.txt' ).perl.say; # OUTPUT: «"txt"␤»
perl6/doc
…/Unix.pod6 :156:
$*SPEC.extension('foo.tar.gz').perl.say; # OUTPUT: «"gz"␤»
perl6/doc
…/Unix.pod6 :157:
$*SPEC.extension('foo' ).perl.say; # OUTPUT: «""␤»
perl6/doc
…/Unix.pod6 :158:
$*SPEC.extension('bar.foo/foo').perl.say; # OUTPUT: «"foo/foo"␤»
perl6/doc
…/Unix.pod6 :169:
say IO::Spec::Unix.is-absolute: "/foo"; # OUTPUT: «True␤»
perl6/doc
…/Unix.pod6 :170:
say IO::Spec::Unix.is-absolute: "/\x[308]foo"; # OUTPUT: «True␤»
perl6/doc
…/Unix.pod6 :171:
say IO::Spec::Unix.is-absolute: "bar"; # OUTPUT: «False␤»
perl6/doc
…/Unix.pod6 :186:
Similar to L«C<catpath>
perl6/doc
…/Unix.pod6 :193:
IO::Spec::Unix.join($, 'foo', 'bar').say; # OUTPUT: «foo/bar␤»
perl6/doc
…/Unix.pod6 :194:
IO::Spec::Unix.join($, '/', '/').say; # OUTPUT: «/␤»
perl6/doc
…/Unix.pod6 :195:
IO::Spec::Unix.join($, '.', 'foo').say; # OUTPUT: «foo␤»
perl6/doc
…/Unix.pod6 :203:
Splits the value of C«%*ENV<PATH>» on colons (C<":">), replaces empty parts with
perl6/doc
…/Unix.pod6 :205:
an empty L<Seq> if C«%*ENV<PATH>» is not set or is an empty string.
perl6/doc
…/Unix.pod6 :209:
# OUTPUT: «("foo", "bar/ber", ".", "foo", ".").Seq␤»
perl6/doc
…/Unix.pod6 :223:
say $*CWD; # OUTPUT: «"/home/camelia".IO␤»
perl6/doc
…/Unix.pod6 :225:
say IO::Spec::Unix.rel2abs: 'foo'; # OUTPUT: «/home/camelia/foo␤»
perl6/doc
…/Unix.pod6 :226:
say IO::Spec::Unix.rel2abs: './'; # OUTPUT: «/home/camelia␤»
perl6/doc
…/Unix.pod6 :227:
say IO::Spec::Unix.rel2abs: 'foo/../../'; # OUTPUT: «/home/camelia/foo/../..␤»
perl6/doc
…/Unix.pod6 :228:
say IO::Spec::Unix.rel2abs: '/foo/'; # OUTPUT: «/foo␤»
perl6/doc
…/Unix.pod6 :230:
say IO::Spec::Unix.rel2abs: 'foo', 'bar'; # OUTPUT: «/home/camelia/bar/foo␤»
perl6/doc
…/Unix.pod6 :231:
say IO::Spec::Unix.rel2abs: './', '/bar'; # OUTPUT: «/bar␤»
perl6/doc
…/Unix.pod6 :232:
say IO::Spec::Unix.rel2abs: '/foo/', 'bar'; # OUTPUT: «/foo␤»
perl6/doc
…/Unix.pod6 :235:
# OUTPUT: «/home/camelia/bar/foo/../..␤»
perl6/doc
…/Unix.pod6 :259:
# OUTPUT: «(:volume(""), :dirname("C:/foo"), :basename("bar.txt"))␤»
perl6/doc
…/Unix.pod6 :262:
# OUTPUT: «(:volume(""), :dirname("/"), :basename("foo"))␤»
perl6/doc
…/Unix.pod6 :265:
# OUTPUT: «(:volume(""), :dirname("/"), :basename("/"))␤»
perl6/doc
…/Unix.pod6 :268:
# OUTPUT: «(:volume(""), :dirname("."), :basename("."))␤»
perl6/doc
…/Unix.pod6 :271:
# OUTPUT: «(:volume(""), :dirname("."), :basename("."))␤»
perl6/doc
…/Unix.pod6 :274:
# OUTPUT: «(:volume(""), :dirname(""), :basename(""))␤»
perl6/doc
…/Unix.pod6 :287:
# OUTPUT: «("C:\\foo", "bar.txt")␤»
perl6/doc
…/Unix.pod6 :290:
# OUTPUT: «("", "foo", "")␤»
perl6/doc
…/Unix.pod6 :293:
# OUTPUT: «("", "", "", "")␤»
perl6/doc
…/Unix.pod6 :296:
# OUTPUT: «(".", "")␤»
perl6/doc
…/Unix.pod6 :299:
# OUTPUT: «(".",)␤»
perl6/doc
…/Unix.pod6 :302:
# OUTPUT: «("",)␤»
perl6/doc
…/Unix.pod6 :320:
# OUTPUT: «("", "C:\\foo/", "bar.txt")␤»
perl6/doc
…/Unix.pod6 :323:
# OUTPUT: «("", "C:\\foo/bar.txt", "")␤»
perl6/doc
…/Unix.pod6 :326:
# OUTPUT: «("", "/foo/", "")␤»
perl6/doc
…/Unix.pod6 :329:
# OUTPUT: «("", "/foo/", "")␤»
perl6/doc
…/Unix.pod6 :332:
# OUTPUT: «("", "///", "")␤»
perl6/doc
…/Unix.pod6 :335:
# OUTPUT: «("", "./", "")␤»
perl6/doc
…/Unix.pod6 :338:
# OUTPUT: «("", "", ".")␤»
perl6/doc
…/Unix.pod6 :341:
# OUTPUT: «("", "", "")␤»
perl6/doc
…/Unix.pod6 :360:
say '..' eq $*SPEC.updir; # OUTPUT: «True␤»
perl6/doc
…/Win32.pod6 :15:
need to use C<IO::Spec::*>. Use L«C<IO::Path>
perl6/doc
…/Win32.pod6 :19:
L«C<IO::Path>
perl6/doc
…/Win32.pod6 :32:
IO::Spec::Win32.basename("foo/bar/") .perl.say; # OUTPUT: «""␤»
perl6/doc
…/Win32.pod6 :33:
IO::Spec::Win32.basename("foo/bar\\").perl.say; # OUTPUT: «""␤»
perl6/doc
…/Win32.pod6 :34:
IO::Spec::Win32.basename("foo/bar/.").perl.say; # OUTPUT: «"."␤»
perl6/doc
…/Win32.pod6 :35:
IO::Spec::Win32.basename("foo/bar") .perl.say; # OUTPUT: «"bar"␤»
perl6/doc
…/Win32.pod6 :48:
# OUTPUT: «C:\foo\..\bar\..\ber␤»
perl6/doc
…/Win32.pod6 :51:
# OUTPUT: «C:\foo\..\bar\..\ber␤»
perl6/doc
…/Win32.pod6 :54:
# OUTPUT: «C:\ber␤»
perl6/doc
…/Win32.pod6 :63:
of the resultant path as a string. The C<@parts> are L«C<Str>
perl6/doc
…/Win32.pod6 :67:
# OUTPUT: «foo\bar\ber\perl␤»
perl6/doc
…/Win32.pod6 :71:
Alias for L«C<catdir>
perl6/doc
…/Win32.pod6 :81:
make the path canonical is made. Use L«C<canonpath>
perl6/doc
…/Win32.pod6 :85:
# OUTPUT: «C:/some/dir\foo.txt␤»
perl6/doc
…/Win32.pod6 :88:
# OUTPUT: «C:/some/dir␤»
perl6/doc
…/Win32.pod6 :91:
# OUTPUT: «/some/dir\foo.txt␤»
perl6/doc
…/Win32.pod6 :94:
# OUTPUT: «E:foo.txt␤»
perl6/doc
…/Win32.pod6 :117:
IO::Spec::Win32.dir-sep.say; # OUTPUT: «\␤»
perl6/doc
…/Win32.pod6 :129:
say IO::Spec::Win32.is-absolute: "/foo"; # OUTPUT: «True␤»
perl6/doc
…/Win32.pod6 :130:
say IO::Spec::Win32.is-absolute: "/\x[308]foo"; # OUTPUT: «True␤»
perl6/doc
…/Win32.pod6 :131:
say IO::Spec::Win32.is-absolute: 「C:\foo」; # OUTPUT: «True␤»
perl6/doc
…/Win32.pod6 :132:
say IO::Spec::Win32.is-absolute: "bar"; # OUTPUT: «False␤»
perl6/doc
…/Win32.pod6 :147:
Similar to L«C<catpath>
perl6/doc
…/Win32.pod6 :155:
# OUTPUT: «C:/some/dir\and/more␤»
perl6/doc
…/Win32.pod6 :158:
# OUTPUT: «C:foo.txt␤»
perl6/doc
…/Win32.pod6 :161:
# OUTPUT: «C:\␤»
perl6/doc
…/Win32.pod6 :164:
# OUTPUT: «//server/share␤»
perl6/doc
…/Win32.pod6 :167:
# OUTPUT: «E:foo.txt␤»
perl6/doc
…/Win32.pod6 :175:
Splits the value of C«%*ENV<PATH>» (or C«%*ENV<Path>» if the former is not set)
perl6/doc
…/Win32.pod6 :181:
IO::Spec::Win32.path.perl.say; # OUTPUT: «(".", "foo", "bar/ber").Seq␤»
perl6/doc
…/Win32.pod6 :195:
say $*CWD; # OUTPUT: «"C:\Users\camelia".IO␤»
perl6/doc
…/Win32.pod6 :197:
say IO::Spec::Win32.rel2abs: 'foo'; # OUTPUT: «C:\Users\camelia\foo␤»
perl6/doc
…/Win32.pod6 :198:
say IO::Spec::Win32.rel2abs: './'; # OUTPUT: «C:\Users\camelia␤»
perl6/doc
…/Win32.pod6 :199:
say IO::Spec::Win32.rel2abs: 'foo/../../'; # OUTPUT: «C:\Users\camelia\foo\..\..␤»
perl6/doc
…/Win32.pod6 :200:
say IO::Spec::Win32.rel2abs: '/foo/'; # OUTPUT: «C:\foo␤»
perl6/doc
…/Win32.pod6 :202:
say IO::Spec::Win32.rel2abs: 'foo', 'bar'; # OUTPUT: «C:\Users\camelia\bar\foo␤»
perl6/doc
…/Win32.pod6 :203:
say IO::Spec::Win32.rel2abs: './', '/bar'; # OUTPUT: «\bar␤»
perl6/doc
…/Win32.pod6 :204:
say IO::Spec::Win32.rel2abs: '/foo/', 'bar'; # OUTPUT: «C:\foo␤»
perl6/doc
…/Win32.pod6 :207:
# OUTPUT: «C:\Users\camelia\bar\foo\..\..␤»
perl6/doc
…/Win32.pod6 :231:
# OUTPUT: «(:volume("C:"), :dirname("/foo"), :basename("bar.txt"))␤»
perl6/doc
…/Win32.pod6 :234:
# OUTPUT: «(:volume(""), :dirname("/"), :basename("foo"))␤»
perl6/doc
…/Win32.pod6 :237:
# OUTPUT: «(:volume(""), :dirname("/"), :basename("\\"))␤»
perl6/doc
…/Win32.pod6 :240:
# OUTPUT: «(:volume(""), :dirname("."), :basename("."))␤»
perl6/doc
…/Win32.pod6 :243:
# OUTPUT: «(:volume(""), :dirname("."), :basename("."))␤»
perl6/doc
…/Win32.pod6 :246:
# OUTPUT: «(:volume(""), :dirname(""), :basename(""))␤»
perl6/doc
…/Win32.pod6 :259:
# OUTPUT: «("C:", "foo", "bar.txt")␤»
perl6/doc
…/Win32.pod6 :262:
# OUTPUT: «("", "foo", "")␤»
perl6/doc
…/Win32.pod6 :265:
# OUTPUT: «("", "", "", "")␤»
perl6/doc
…/Win32.pod6 :268:
# OUTPUT: «(".", "")␤»
perl6/doc
…/Win32.pod6 :271:
# OUTPUT: «(".",)␤»
perl6/doc
…/Win32.pod6 :274:
# OUTPUT: «("",)␤»
perl6/doc
…/Win32.pod6 :292:
# OUTPUT: «("C:", "\\foo/", "bar.txt")␤»
perl6/doc
…/Win32.pod6 :295:
# OUTPUT: «("C:", "\\foo/bar.txt", "")␤»
perl6/doc
…/Win32.pod6 :298:
# OUTPUT: «("", "/foo/", "")␤»
perl6/doc
…/Win32.pod6 :301:
# OUTPUT: «("", "/foo/", "")␤»
perl6/doc
…/Win32.pod6 :304:
# OUTPUT: «("", "///", "")␤»
perl6/doc
…/Win32.pod6 :307:
# OUTPUT: «("", "./", "")␤»
perl6/doc
…/Win32.pod6 :310:
# OUTPUT: «("", "", ".")␤»
perl6/doc
…/Win32.pod6 :313:
# OUTPUT: «("", "", "")␤»
perl6/doc
…/Special.pod6 :10:
Used as a L«C<$.path>
perl6/doc
…/Special.pod6 :12:
abridged interface of L«C<IO::Handle>
perl6/doc
…/Special.pod6 :27:
say $*OUT.path.what; # OUTPUT: «<STDOUT>␤»
perl6/doc
…/Special.pod6 :29:
Returns one of the strings C«'<STDIN>'», C«'<STDOUT>'», or C«'<STDERR>'»,
perl6/doc
…/Special.pod6 :42:
This returns C«'<STDIN>'», C«'<STDOUT>'», or C«'<STDERR>'» as appropriate.
perl6/doc
…/Special.pod6 :105:
The last modified time always returns an L«C<Instant>
perl6/doc
…/Special.pod6 :112:
The last accessed time always returns an L«C<Instant>
perl6/doc
…/Special.pod6 :119:
The last changed time always returns an L«C<Instant>
perl6/doc
…/Instant.pod6 :63:
say DateTime.new(Instant.from-posix(915148800, True)); # OUTPUT: «1998-12-31T23:59:60Z␤»
perl6/doc
…/Instant.pod6 :64:
say DateTime.new(Instant.from-posix(915148800)); # OUTPUT: «1999-01-01T00:00:00Z␤»
perl6/doc
…/Instant.pod6 :76:
say DateTime.new("1999-01-01T00:00:00Z").Instant.to-posix; # OUTPUT: «(915148800 False)␤»
perl6/doc
…/Instant.pod6 :77:
say DateTime.new('1998-12-31T23:59:60Z').Instant.to-posix; # OUTPUT: «(915148800 True)␤»
perl6/doc
…/Instant.pod6 :88:
say $i; # OUTPUT: «Instant:1451489025.878018␤»
perl6/doc
…/Instant.pod6 :89:
say $i.Date; # OUTPUT: «2015-12-30␤»
perl6/doc
…/Instant.pod6 :99:
say now.DateTime; # OUTPUT: «2017-05-09T14:02:58.147165Z␤»
perl6/doc
…/Int.pod6 :20:
# OUTPUT: «True␤»
perl6/doc
…/Int.pod6 :73:
say expmod(4, 2, 5); # OUTPUT: «1␤»
perl6/doc
…/Int.pod6 :74:
say 7.expmod(2, 5); # OUTPUT: «4␤»
perl6/doc
…/Int.pod6 :98:
say $seconds.polymod(60, 60); # OUTPUT: «(5 4 27)␤»
perl6/doc
…/Int.pod6 :99:
say $seconds.polymod(60, 60, 24); # OUTPUT: «(5 4 3 1)␤»
perl6/doc
…/Int.pod6 :101:
say 120.polymod: 1, 10, 10², 10³, 10⁴; # OUTPUT: «(0 0 12 0 0 0)␤»
perl6/doc
…/Int.pod6 :102:
say 120.polymod: lazy 1, 10, 10², 10³, 10⁴; # OUTPUT: «(0 0 12)␤»
perl6/doc
…/Int.pod6 :103:
say 120.polymod: 1, 10, 10² … ∞; # OUTPUT: «(0 0 12)␤»
perl6/doc
…/Int.pod6 :105:
say ⅔.polymod(⅓); # OUTPUT: «(0 2)␤»
perl6/doc
…/Int.pod6 :106:
say 5.Rat.polymod(.3, .2); # OUTPUT: «(0.2 0 80)␤»
perl6/doc
…/Int.pod6 :109:
say @digits-in-base37.reverse # OUTPUT: «[4 32 4 15 36]␤»
perl6/doc
…/Int.pod6 :127:
say @pieces; # OUTPUT: «[5 4 3 2]␤»
perl6/doc
…/Int.pod6 :144:
say 2.is-prime; # OUTPUT: «True␤»
perl6/doc
…/Int.pod6 :145:
say is-prime(9); # OUTPUT: «False␤»
perl6/doc
…/Int.pod6 :158:
say 0b01011.lsb; # OUTPUT: «0␤»
perl6/doc
…/Int.pod6 :159:
say 0b01010.lsb; # OUTPUT: «1␤»
perl6/doc
…/Int.pod6 :160:
say 0b10100.lsb; # OUTPUT: «2␤»
perl6/doc
…/Int.pod6 :161:
say 0b01000.lsb; # OUTPUT: «3␤»
perl6/doc
…/Int.pod6 :162:
say 0b10000.lsb; # OUTPUT: «4␤»
perl6/doc
…/Int.pod6 :175:
say 0b00001.msb; # OUTPUT: «0␤»
perl6/doc
…/Int.pod6 :176:
say 0b00011.msb; # OUTPUT: «1␤»
perl6/doc
…/Int.pod6 :177:
say 0b00101.msb; # OUTPUT: «2␤»
perl6/doc
…/Int.pod6 :178:
say 0b01010.msb; # OUTPUT: «3␤»
perl6/doc
…/Int.pod6 :179:
say 0b10011.msb; # OUTPUT: «4␤»
perl6/doc
…/Int.pod6 :191:
say ord("¾").unival; # OUTPUT: «0.75␤»
perl6/doc
…/Int.pod6 :192:
say 190.unival; # OUTPUT: «0.75␤»
perl6/doc
…/Int.pod6 :193:
say unival(65); # OUTPUT: «NaN␤»
perl6/doc
…/IntStr.pod6 :14:
my $f = <42>; say $f.^name; # OUTPUT: «IntStr␤»
perl6/doc
…/IntStr.pod6 :16:
As a subclass of both L«C<Int>
perl6/doc
…/IntStr.pod6 :35:
say +$f; # OUTPUT: «42␤»
perl6/doc
…/IntStr.pod6 :36:
say ~$f; # OUTPUT: «"forty two"␤»
perl6/doc
…/IntStr.pod6 :69:
say <5> ~~ "5.0"; # OUTPUT: «False␤»
perl6/doc
…/IntStr.pod6 :70:
say <5> ~~ 5.0 ; # OUTPUT: «True␤»
perl6/doc
…/IntStr.pod6 :71:
say <5> ~~ <5.0>; # OUTPUT: «True␤»
perl6/doc
…/IntStr.pod6 :85:
say $f cmp $g; # OUTPUT: «Less␤»
perl6/doc
…/IntStr.pod6 :86:
say $f.Str cmp $g.Str; # OUTPUT: «More␤»
perl6/doc
…/Iterable.pod6 :23:
.say for @a; # OUTPUT: «G␤A␤A␤T␤C␤C␤»
perl6/doc
…/Iterable.pod6 :51:
say (<a b>, 'c').elems; # OUTPUT: «2␤»
perl6/doc
…/Iterable.pod6 :52:
say (<a b>, 'c').flat.elems; # OUTPUT: «3␤»
perl6/doc
…/Iterable.pod6 :60:
say ($('a', 'b'), 'c').perl; # OUTPUT: «($("a", "b"), "c")␤»
perl6/doc
…/Iterable.pod6 :70:
say (1 ... 1000).is-lazy; # OUTPUT: «False␤»
perl6/doc
…/Iterable.pod6 :71:
say (1 ... 1000).lazy.is-lazy; # OUTPUT: «True␤»
perl6/doc
…/Iterable.pod6 :79:
B«NOTE: currently, L<this method is
perl6/doc
…/Iterable.pod6 :95:
B«NOTE: currently, L<this method is
perl6/doc
…/Iterator.pod6 :54:
# OUTPUT: «[1 3]␤[5 8]␤»
perl6/doc
…/Iterator.pod6 :76:
say $i.pull-one; # OUTPUT: «1␤»
perl6/doc
…/Iterator.pod6 :77:
say $i.pull-one; # OUTPUT: «2␤»
perl6/doc
…/Iterator.pod6 :78:
say $i.pull-one; # OUTPUT: «3␤»
perl6/doc
…/Iterator.pod6 :95:
say (1 .. Inf).iterator.push-exactly(@array, 3); # OUTPUT: «3␤»
perl6/doc
…/Iterator.pod6 :96:
say @array; # OUTPUT: «[1 2 3]␤»
perl6/doc
…/Iterator.pod6 :116:
say (1 .. Inf).iterator.push-at-least(@array, 10); # OUTPUT: «10␤»
perl6/doc
…/Iterator.pod6 :117:
say @array; # OUTPUT: «[1 2 3 4 5 6 7 8 9 10]␤»
perl6/doc
…/Iterator.pod6 :157:
say (1 .. 100).is-lazy; # OUTPUT: «False␤»
perl6/doc
…/Iterator.pod6 :158:
say (1 .. Inf).is-lazy; # OUTPUT: «True␤»
perl6/doc
…/Iterator.pod6 :182:
# OUTPUT: «1␤b␤0␤»
perl6/doc
…/Iterator.pod6 :195:
# OUTPUT: «1␤c␤0␤»
perl6/doc
…/Iterator.pod6 :209:
# OUTPUT: «c␤True␤»
perl6/doc
…/Junction.pod6 :66:
say @primes_ending_in_1; # OUTPUT: «[11 31 41 61 71]␤»
perl6/doc
…/Junction.pod6 :80:
say so @a && all(@a); # OUTPUT: «False␤»
perl6/doc
…/Junction.pod6 :114:
(gather $j».take).grep(Numeric).say; # OUTPUT: «(42 2.1)␤»
perl6/doc
…/Junction.pod6 :121:
we can L«C<.grep>
perl6/doc
…/Junction.pod6 :127:
$! and say "Got exception: $!.^name()"; # OUTPUT: «Got exception: X::Str::Numeric␤»
perl6/doc
…/Junction.pod6 :136:
say try calc $j; # OUTPUT: «Nil␤»
perl6/doc
…/Junction.pod6 :139:
L«C<try> block
perl6/doc
…/Junction.pod6 :146:
say so $j == 42; # OUTPUT: «True␤»
perl6/doc
…/Label.pod6 :21:
say USERS.^name; # OUTPUT: «Label␤»
perl6/doc
…/List.pod6 :57:
my @b = %h; say @b.elems; # OUTPUT: «2␤»
perl6/doc
…/List.pod6 :58:
my @c = %h, ; say @c.elems; # OUTPUT: «1␤»
perl6/doc
…/List.pod6 :59:
my @d = $%h; say @d.elems; # OUTPUT: «1␤»
perl6/doc
…/List.pod6 :64:
say fe(<a b>, <d e>); # OUTPUT: «4␤»
perl6/doc
…/List.pod6 :65:
say fe(<a b>, <d e>.item); # OUTPUT: «3␤»
perl6/doc
…/List.pod6 :75:
# OUTPUT: «True␤True␤True␤»
perl6/doc
…/List.pod6 :80:
say [@a.elems, @a.Bool, ?@a]; # OUTPUT: «[0 False False]␤»
perl6/doc
…/List.pod6 :82:
say [@a.elems, @a.Bool, ?@a]; # OUTPUT: «[1 True True]␤»
perl6/doc
…/List.pod6 :96:
say (1,2,3,4).elems; # OUTPUT: «4␤»
perl6/doc
…/List.pod6 :107:
say (1,2,3,4).end; # OUTPUT: «3␤»
perl6/doc
…/List.pod6 :118:
say (1,2,3,4).keys; # OUTPUT: «0..3␤»
perl6/doc
…/List.pod6 :129:
say (1,2,3,4).^name; # OUTPUT: «List␤»
perl6/doc
…/List.pod6 :130:
say (1,2,3,4).values.^name; # OUTPUT: «Seq␤»
perl6/doc
…/List.pod6 :164:
say <a b c>.antipairs; # OUTPUT: «(a => 0 b => 1 c => 2)␤»
perl6/doc
…/List.pod6 :178:
join ', ', <a b c>; # RESULT: «a, b, c»
perl6/doc
…/List.pod6 :182:
say (1, <a b c>).join('
perl6/doc
…/List.pod6 :195:
say ('hello', 1, 22/7, 42, 'world').map: { .^name } # OUTPUT: «(Str Int Rat Int Str)␤»
perl6/doc
…/List.pod6 :196:
say map *.Str.chars, 'hello', 1, 22/7, 42, 'world'; # OUTPUT: «(5 1 8 2 5)␤»
perl6/doc
…/List.pod6 :202:
say <a b x y>.map(&b).join(', '); # OUTPUT: «a before b, x before y␤»
perl6/doc
…/List.pod6 :231:
# RESULT: «hi»
perl6/doc
…/List.pod6 :243:
say flat 1, (2, (3, 4), $(5, 6)); # OUTPUT: «(1 2 3 4 (5 6))␤»
perl6/doc
…/List.pod6 :251:
Like L«C<map>
perl6/doc
…/List.pod6 :264:
# OUTPUT «("first1", "second5", "third3", "third4", "second2", "first6").Seq␤»
perl6/doc
…/List.pod6 :267:
# OUTPUT «("first1 was a Str", "second2 third3 third4 second5 was a List", "first6 was a Str").Seq␤»
perl6/doc
…/List.pod6 :270:
# OUTPUT «("first1", "second5", "third3", "third4", "second2", "first6").Seq␤»
perl6/doc
…/List.pod6 :281:
L«C<is-lazy>
perl6/doc
…/List.pod6 :284:
put (1, 2, 3).gist; # OUTPUT «(1 2 3)␤»
perl6/doc
…/List.pod6 :285:
put (1..∞).List.gist; # OUTPUT «(...)␤»
perl6/doc
…/List.pod6 :309:
say ('hello', 1, 22/7, 42, 'world').grep: Int; # OUTPUT: «(1 42)␤»
perl6/doc
…/List.pod6 :310:
say grep { .Str.chars > 3 }, 'hello', 1, 22/7, 42, 'world'; # OUTPUT: «(hello 3.142857 world)␤»
perl6/doc
…/List.pod6 :316:
say <a b 6 d 8 0>.grep(none Int); # OUTPUT: «(a b d)␤»
perl6/doc
…/List.pod6 :317:
say <a b c d e f>.grep(none /<[aeiou]>/); # OUTPUT: «(b c d f)␤»
perl6/doc
…/List.pod6 :322:
say <a b c d e f>.grep({! /<[aeiou]>/}) # OUTPUT: «(b c d f)␤»
perl6/doc
…/List.pod6 :326:
C«/<[aeiou]>/» regex and negates the result. Smartmatching against a
perl6/doc
…/List.pod6 :355:
# OUTPUT: «(1 3)␤»
perl6/doc
…/List.pod6 :357:
# OUTPUT: «(0 hello 2 3.142857 4 world)␤»
perl6/doc
…/List.pod6 :359:
# OUTPUT: «(0 => hello 2 => 3.142857 4 => world)␤»
perl6/doc
…/List.pod6 :375:
say (1, 22/7, 42, 300).first: * > 5; # OUTPUT: «42␤»
perl6/doc
…/List.pod6 :376:
say (1, 22/7, 42, 300).first: * > 5, :end; # OUTPUT: «300␤»
perl6/doc
…/List.pod6 :377:
say ('hello', 1, 22/7, 42, 'world').first: Complex; # OUTPUT: «Nil␤»
perl6/doc
…/List.pod6 :398:
say (1, 22/7, 42, 300).first: * > 5, :k; # OUTPUT: «2␤»
perl6/doc
…/List.pod6 :399:
say (1, 22/7, 42, 300).first: * > 5, :p; # OUTPUT: «2 => 42␤»
perl6/doc
…/List.pod6 :400:
say (1, 22/7, 42, 300).first: * > 5, :kv, :end; # OUTPUT: «(3 300)␤»
perl6/doc
…/List.pod6 :404:
L«C<head>
perl6/doc
…/List.pod6 :417:
say ^10 .head(5); # OUTPUT: «(0 1 2 3 4)␤»
perl6/doc
…/List.pod6 :418:
say ^Inf .head(5); # OUTPUT: «(0 1 2 3 4)␤»
perl6/doc
…/List.pod6 :419:
say ^10 .head; # OUTPUT: «0␤»
perl6/doc
…/List.pod6 :420:
say ^Inf .head; # OUTPUT: «0␤»
perl6/doc
…/List.pod6 :435:
say ^10 .tail(5); # OUTPUT: «(5 6 7 8 9)␤»
perl6/doc
…/List.pod6 :437:
say ^10 .tail; # OUTPUT: «(9)␤»
perl6/doc
…/List.pod6 :464:
say categorize &mapper, (1, 7, 6, 3, 2); # OUTPUT: «{even => [6 2], not prime => [1 6],
perl6/doc
…/List.pod6 :484:
# OUTPUT: «{even => [6 2], odd => [1 7 3]}␤»
perl6/doc
…/List.pod6 :486:
# OUTPUT: «{1 => [1], 2 => [42], 5 => [hello world], 8 => [3.142857]}␤»
perl6/doc
…/List.pod6 :497:
say ().Bool; # OUTPUT: «False␤»
perl6/doc
…/List.pod6 :498:
say (1).Bool; # OUTPUT: «True␤»
perl6/doc
…/List.pod6 :509:
say (1,2,3,4,5).Str; # OUTPUT: «1 2 3 4 5␤»
perl6/doc
…/List.pod6 :519:
say (1,2,3,4,5).Int; # OUTPUT: «5␤»
perl6/doc
…/List.pod6 :529:
say (1,2,3,4,5).Numeric; # OUTPUT: «5␤»
perl6/doc
…/List.pod6 :547:
say $capture.keys; # OUTPUT: «(0 1 a b)␤»
perl6/doc
…/List.pod6 :548:
my-sub(
perl6/doc
…/List.pod6 :558:
say so $list.Capture ~~ :($ where * == 7,$,:$a,:$b); # OUTPUT: «True␤»
perl6/doc
…/List.pod6 :561:
say so $list.Capture ~~ :($ where * == 7,$,:$a,:$b); # OUTPUT: «False␤»
perl6/doc
…/List.pod6 :581:
say <a b c d e>.pick; # OUTPUT: «b␤»
perl6/doc
…/List.pod6 :582:
say <a b c d e>.pick: 3; # OUTPUT: «(c a e)␤»
perl6/doc
…/List.pod6 :583:
say <a b c d e>.pick: *; # OUTPUT: «(e d a b c)␤»
perl6/doc
…/List.pod6 :619:
say (1,2,3,4,5).eager; # OUTPUT: «(1 2 3 4 5)␤»
perl6/doc
…/List.pod6 :628:
Returns a L«C<Seq>
perl6/doc
…/List.pod6 :635:
say <hello world!>.reverse; # OUTPUT: «(world! hello)␤»
perl6/doc
…/List.pod6 :636:
say reverse ^10; # OUTPUT: «(9 8 7 6 5 4 3 2 1 0)␤»
perl6/doc
…/List.pod6 :676:
say (3, -4, 7, -1, 2, 0).sort; # OUTPUT: «(-4 -1 0 2 3 7)␤»
perl6/doc
…/List.pod6 :677:
say (3, -4, 7, -1, 2, 0).sort: *.abs; # OUTPUT: «(0 -1 2 3 -4 7)␤»
perl6/doc
…/List.pod6 :678:
say (3, -4, 7, -1, 2, 0).sort: { $^b leg $^a }; # OUTPUT: «(7 3 2 0 -4 -1)␤»
perl6/doc
…/List.pod6 :696:
say <a a b b b c c>.unique; # OUTPUT: «(a b c)␤»
perl6/doc
…/List.pod6 :697:
say <a b b c c b a>.unique; # OUTPUT: «(a b c)␤»
perl6/doc
…/List.pod6 :708:
say <a A B b c b C>.unique(:as(&lc)) # OUTPUT: «(a B c)␤»
perl6/doc
…/List.pod6 :717:
say @list.unique(:with(&[eqv])) # OUTPUT: «({a => 42} {b => 13})␤»
perl6/doc
…/List.pod6 :737:
say <a a b b b c c>.repeated; # OUTPUT: «(a b b c)␤»
perl6/doc
…/List.pod6 :738:
say <a b b c c b a>.repeated; # OUTPUT: «(b c b a)␤»
perl6/doc
…/List.pod6 :739:
say <a A B b c b C>.repeated(:as(&lc)); # OUTPUT: «(A b b C)␤»
perl6/doc
…/List.pod6 :742:
say @list.repeated(:with(&[eqv])) # OUTPUT: «({a => 42})␤»
perl6/doc
…/List.pod6 :761:
say <a a b b b c c>.squish; # OUTPUT: «(a b c)␤»
perl6/doc
…/List.pod6 :762:
say <a b b c c b a>.squish; # OUTPUT: «(a b c b a)␤»
perl6/doc
…/List.pod6 :769:
say [42, "42"].squish; # OUTPUT: «(42 42)␤»
perl6/doc
…/List.pod6 :771:
say [42, "42"].squish(with => &infix:<eq>); # OUTPUT: «(42)␤»
perl6/doc
…/List.pod6 :801:
[2,3,4].reduce(&[**]).lsb.say; # OUTPUT: «81␤»
perl6/doc
…/List.pod6 :802:
(2**(3**4)).lsb.say; # OUTPUT: «81␤»
perl6/doc
…/List.pod6 :803:
(2**3**4).lsb.say; # OUTPUT: «81␤»
perl6/doc
…/List.pod6 :806:
[2,3,4].reduce(&[-]).say; # OUTPUT: «-5␤»
perl6/doc
…/List.pod6 :807:
((2-3)-4).say; # OUTPUT: «-5␤»
perl6/doc
…/List.pod6 :808:
(2-3-4).say; # OUTPUT: «-5␤»
perl6/doc
…/List.pod6 :843:
say [foo] 1, 2, 3, 4; # OUTPUT: «(1, (2, (3, 4)))␤»
perl6/doc
…/List.pod6 :846:
say [bar] 1, 2, 3, 4; # OUTPUT: «(((1, 2), 3), 4)␤»
perl6/doc
…/List.pod6 :869:
[2,3,4].produce(&[**]).say; # OUTPUT: «(4 81 2417851639229258349412352)␤»
perl6/doc
…/List.pod6 :870:
say produce &[**], (2,3,4); # OUTPUT: «(4 81 2417851639229258349412352)␤»
perl6/doc
…/List.pod6 :871:
say [\**] (2,3,4); # OUTPUT: «(4 81 2417851639229258349412352)␤»
perl6/doc
…/List.pod6 :874:
[2,3,4].produce(&[-]).say; # OUTPUT: «(2 -1 -5)␤»
perl6/doc
…/List.pod6 :875:
say produce &[-], (2,3,4); # OUTPUT: «(2 -1 -5)␤»
perl6/doc
…/List.pod6 :876:
say [\-] (2,3,4); # OUTPUT: «(2 -1 -5)␤»
perl6/doc
…/List.pod6 :903:
say (2,3,4,5).produce: { last if $^a > 7; $^a + $^b }; # OUTPUT: «(2 5 9)␤»
perl6/doc
…/List.pod6 :917:
# OUTPUT: «a
perl6/doc
…/List.pod6 :928:
# OUTPUT: «a
perl6/doc
…/List.pod6 :939:
# OUTPUT: «0 1
perl6/doc
…/List.pod6 :963:
# OUTPUT: «a
perl6/doc
…/List.pod6 :978:
# OUTPUT: «0 1 2␤
perl6/doc
…/List.pod6 :999:
say ('a'..'h').rotor(3).join('
perl6/doc
…/List.pod6 :1000:
say ('a'..'h').rotor(3, :partial).join('
perl6/doc
…/List.pod6 :1006:
say ('a'..'h').rotor(2 => 1).join('
perl6/doc
…/List.pod6 :1007:
say ('a'..'h').rotor(3 => -1).join('
perl6/doc
…/List.pod6 :1012:
say ('a'..'h').rotor(2, 3).join('
perl6/doc
…/List.pod6 :1013:
say ('a'..'h').rotor(1 => 1, 3).join('
perl6/doc
…/List.pod6 :1018:
# OUTPUT: «a
perl6/doc
…/List.pod6 :1032:
# OUTPUT: «ad,ae,af,bd,be,bf,cd,ce,cf␤»
perl6/doc
…/List.pod6 :1043:
# OUTPUT: «4,5,6,8,10,12,12,15,18␤»
perl6/doc
…/List.pod6 :1064:
# OUTPUT: «((a d g) (b e h) (c f i))␤»
perl6/doc
…/List.pod6 :1074:
# OUTPUT: «a,d,g␤
perl6/doc
…/List.pod6 :1097:
# OUTPUT: «1␤
perl6/doc
…/List.pod6 :1118:
# OUTPUT: «((a d g) (b e h) (c f i))␤»
perl6/doc
…/List.pod6 :1121:
# OUTPUT: «1,2,3␤
perl6/doc
…/List.pod6 :1128:
# OUTPUT: «((a d g) (b e h) (c f i) (m j) (n) (o) (p))␤»
perl6/doc
…/List.pod6 :1131:
# OUTPUT: «1,2,3␤
perl6/doc
…/List.pod6 :1153:
say (1, 3, pi).sum; # OUTPUT: «7.14159265358979␤»
perl6/doc
…/List.pod6 :1154:
say (1, "0xff").sum; # OUTPUT: «256␤»
perl6/doc
…/List.pod6 :1155:
say sum(0b1111, 5); # OUTPUT: «20␤»
perl6/doc
…/List.pod6 :1169:
say @a.fmt('%03d', ','); # OUTPUT: «008,009,010,011␤»
perl6/doc
…/List.pod6 :1173:
Assumes the list contains L«C<Match> objects
perl6/doc
…/List.pod6 :1177:
say $/.list.from; # OUTPUT: «2␤»
perl6/doc
…/List.pod6 :1180:
say $/.list.from; # OUTPUT: «3␤»
perl6/doc
…/List.pod6 :1185:
say $/.to; # OUTPUT: «6␤»
perl6/doc
…/List.pod6 :1187:
Assumes the C<List> contains L«C<Match> objects
perl6/doc
…/Lock.pod6 :20:
say $x; # OUTPUT: «10␤»
perl6/doc
…/Map.pod6 :41:
say Map.new('a', 1, :b(2) ).keys; # OUTPUT: «(a)␤»
perl6/doc
…/Map.pod6 :44:
say Map.new( ('a', 1, :b(2)) ).keys; # OUTPUT: «(a b)␤»
perl6/doc
…/Map.pod6 :55:
say %map.elems; # OUTPUT: «2␤»
perl6/doc
…/Map.pod6 :84:
say $map{'a'}; # OUTPUT: «1␤»
perl6/doc
…/Map.pod6 :104:
say $m.keys; # OUTPUT: «(a b)␤»
perl6/doc
…/Map.pod6 :115:
say $m.values; # OUTPUT: «((2 3) 17)␤»
perl6/doc
…/Map.pod6 :126:
say $m.pairs; # OUTPUT: «(a => (2 3) b => 17)␤»
perl6/doc
…/Map.pod6 :140:
say $m.antipairs; # OUTPUT: «((2 3) => a 17 => b)␤»
perl6/doc
…/Map.pod6 :154:
say $m.invert; # OUTPUT: «(2 => a 3 => a 17 => b)␤»
perl6/doc
…/Map.pod6 :175:
say $m.Int; # OUTPUT: «2␤»
perl6/doc
…/Map.pod6 :186:
say $m.Numeric; # OUTPUT: «2␤»
perl6/doc
…/Map.pod6 :197:
say $m.Bool; # OUTPUT: «True␤»
perl6/doc
…/Map.pod6 :211:
my-sub(
perl6/doc
…/Match.pod6 :58:
say 'abc' ~~ /^/; # OUTPUT: «「」␤»
perl6/doc
…/Match.pod6 :59:
say $/.from, ' ', $/.to, ' ', ?$/; # OUTPUT: «0 0 True␤»
perl6/doc
…/Match.pod6 :70:
say $/.Str; # OUTPUT: «123␤»
perl6/doc
…/Match.pod6 :104:
say $/.prematch; # OUTPUT: «ab␤»
perl6/doc
…/Match.pod6 :108:
say $/.[1].prematch; # OUTPUT: «abc1␤»
perl6/doc
…/Match.pod6 :119:
say $/.postmatch; # OUTPUT: «efg␤»
perl6/doc
…/Match.pod6 :123:
say $/.[1].postmatch; # OUTPUT: «3def␤»
perl6/doc
…/Match.pod6 :131:
via L«C<.made>
perl6/doc
…/C3MRO.pod6 :28:
say Weird.^mro; # OUTPUT: «(Weird) (Child1) (GrandChild2) (Child2) (CommonAncestor) (Any) (Mu)␤»
perl6/doc
…/C3MRO.pod6 :51:
say Int.^mro; # OUTPUT: «((Int) (Cool) (Any) (Mu))␤»
perl6/doc
…/ClassHOW.pod6 :34:
say so Int.HOW ~~ Metamodel::ClassHOW; # OUTPUT: «True␤»
perl6/doc
…/ClassHOW.pod6 :35:
say Int.^methods(:all).pick.name; # OUTPUT: «random Int method name␤»
perl6/doc
…/ClassHOW.pod6 :70:
say B.^can('x').elems; # OUTPUT: «2␤»
perl6/doc
…/ClassHOW.pod6 :72:
say .arity; # OUTPUT: «1, 2␤»
perl6/doc
…/ClassHOW.pod6 :89:
say Str.^lookup('Int').perl; # OUTPUT: «method Int (Str:D $: *%_) { #`(Method
perl6/doc
…/MethodContainer.pod6 :17:
say 21.double; # OUTPUT: «42␤»
perl6/doc
…/MethodContainer.pod6 :70:
say 2.5.^lookup("sqrt").perl: # OUTPUT: «method sqrt (Rat $: *%_) ...␤»
perl6/doc
…/MethodContainer.pod6 :71:
say Str.^lookup("BUILD").perl; # OUTPUT: «submethod BUILD (Str $: :$value = "", *%_ --> Nil) ...␤»
perl6/doc
…/MethodContainer.pod6 :72:
say Int.^lookup("does-not-exist"); # OUTPUT: «(Mu)␤»
perl6/doc
…/MultipleInheritance.pod6 :52:
# OUTPUT: «(B, C1, C2, D, Any, Mu)␤»
perl6/doc
…/MultipleInheritance.pod6 :54:
# OUTPUT: «[B, ([C1, [D, [Any, [Mu]]]], [C2, [D, [Any, [Mu]]]])]␤»
perl6/doc
…/Naming.pod6 :20:
say 42.^name; # OUTPUT: «Int␤»
perl6/doc
…/Primitives.pod6 :28:
# OUTPUT: «X::Method::NotFound: Method 'list' not found for invocant of class 'why oh why?'␤»
perl6/doc
…/PrivateMethodContainer.pod6 :40:
Returns a hash of C«name => &method_object»
perl6/doc
…/Method.pod6 :24:
# OUTPUT: «("a", "b", "c")␤(a b c)␤»
perl6/doc
…/Method.pod6 :35:
# OUTPUT: «Int␤»
perl6/doc
…/Method.pod6 :50:
# OUTPUT: «1 named␤2 named␤»
perl6/doc
…/Mix.pod6 :24:
say $recipe.elems; # OUTPUT: «3␤»
perl6/doc
…/Mix.pod6 :25:
say $recipe.keys.sort; # OUTPUT: «butter flour sugar␤»
perl6/doc
…/Mix.pod6 :26:
say $recipe.pairs.sort; # OUTPUT: «"butter" => 0.22 "flour" => 0.275 "sugar" => 0.12␤»
perl6/doc
…/Mix.pod6 :27:
say $recipe.total; # OUTPUT: «0.615␤»
perl6/doc
…/Mix.pod6 :36:
say $recipe<butter>; # OUTPUT: «0.22␤»
perl6/doc
…/Mix.pod6 :37:
say $recipe<sugar>; # OUTPUT: «0.12␤»
perl6/doc
…/Mix.pod6 :38:
say $recipe<chocolate>; # OUTPUT: «0␤»
perl6/doc
…/Mix.pod6 :48:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Pair) (Pair))␤»
perl6/doc
…/Mix.pod6 :49:
say $n.pairs; # OUTPUT: «(a => 2 (c => 3.14) => 1 (b => 0) => 1)␤»
perl6/doc
…/Mix.pod6 :59:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Str))␤»
perl6/doc
…/Mix.pod6 :60:
say $n.pairs; # OUTPUT: «(a => 2 c => 3.14)␤»
perl6/doc
…/Mix.pod6 :85:
Coerces the C<Mix> to a L«C<Bag>
perl6/doc
…/Mix.pod6 :95:
Coerces the C<Mix> to a L«C<BagHash>
perl6/doc
…/MixHash.pod6 :21:
say $recipe.elems; # OUTPUT: «3␤»
perl6/doc
…/MixHash.pod6 :22:
say $recipe.keys.sort; # OUTPUT: «butter flour sugar␤»
perl6/doc
…/MixHash.pod6 :23:
say $recipe.pairs.sort; # OUTPUT: «"butter" => 0.22 "flour" => 0.275 "sugar" => 0.12␤»
perl6/doc
…/MixHash.pod6 :24:
say $recipe.total; # OUTPUT: «0.615␤»
perl6/doc
…/MixHash.pod6 :38:
say $recipe<butter>; # OUTPUT: «0.22␤»
perl6/doc
…/MixHash.pod6 :39:
say $recipe<sugar>; # OUTPUT: «0.12␤»
perl6/doc
…/MixHash.pod6 :40:
say $recipe<chocolate>; # OUTPUT: «0␤»
perl6/doc
…/MixHash.pod6 :44:
say $recipe.pairs; # OUTPUT: «"sugar" => 0.12 "flour" => 0.275 "chocolate" => 0.3␤»
perl6/doc
…/MixHash.pod6 :55:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Pair) (Pair))␤»
perl6/doc
…/MixHash.pod6 :56:
say $n.pairs; # OUTPUT: «(a => 2 (c => 3.14) => 1 (b => 0) => 1)␤»
perl6/doc
…/MixHash.pod6 :66:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Str))␤»
perl6/doc
…/MixHash.pod6 :67:
say $n.pairs; # OUTPUT: «(a => 2 c => 3.14)␤»
perl6/doc
…/MixHash.pod6 :89:
Coerces the C<MixHash> to a L«C<Bag>
perl6/doc
…/MixHash.pod6 :99:
Coerces the C<MixHash> to a L«C<BagHash>
perl6/doc
…/Mixy.pod6 :21:
mix('a', 'b', 'c', 'a', 'a', 'd').total == 6; # RESULT: «True»
perl6/doc
…/Mixy.pod6 :22:
{a => 5.6, b => 2.4}.Mix.total == 8; # RESULT: «True»
perl6/doc
…/Mu.pod6 :26:
say Int.defined; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :27:
say 42.defined; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :33:
say fails().defined; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :43:
say $i.isa("Int"); # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :44:
say $i.isa(Any); # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :49:
say $s ~~ Str; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :65:
say $d ~~ Dateish; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :66:
say $d ~~ Any; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :67:
say $d ~~ DateTime; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :79:
say Mu.Bool; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :80:
say Mu.new.Bool; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :81:
say [1, 2, 3].Bool; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :82:
say [].Bool; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :83:
say { 'hash' => 'full' }.Bool; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :84:
say {}.Bool; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :85:
say "".Bool; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :86:
say 0.Bool; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :87:
say 1.Bool; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :88:
say "0".Bool; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :103:
}.new.Capture.say; # OUTPUT: «\(:bar("something else"), :foo(42))␤»
perl6/doc
…/Mu.pod6 :132:
say Mu.gist; # OUTPUT: «(Mu)␤»
perl6/doc
…/Mu.pod6 :133:
say Mu.new.gist; # OUTPUT: «Mu.new␤»
perl6/doc
…/Mu.pod6 :150:
say [1,2,3].item.perl; # OUTPUT: «$[1, 2, 3]␤»
perl6/doc
…/Mu.pod6 :151:
say { apple => 10 }.item.perl; # OUTPUT: «${:apple(10)}␤»
perl6/doc
…/Mu.pod6 :152:
say "abc".item.perl; # OUTPUT: «"abc"␤»
perl6/doc
…/Mu.pod6 :178:
say $p; # OUTPUT: «Point(2, 3)␤»
perl6/doc
…/Mu.pod6 :179:
say $p.clone(y => -5); # OUTPUT: «Point(2, -5)␤»
perl6/doc
…/Mu.pod6 :203:
say $o1; # OUTPUT: «Foo.new(foo => 42, bar => ["Z", "Y"], baz => {:X("W"), :Z("Y")}, …␤»
perl6/doc
…/Mu.pod6 :204:
say $o2; # OUTPUT: «Foo.new(foo => 70, bar => ["Z", "Y"], baz => {:X("W"), :Z("Y")}, …␤»
perl6/doc
…/Mu.pod6 :205:
$o1.boo.(); # OUTPUT: «Hi␤»
perl6/doc
…/Mu.pod6 :206:
$o2.boo.(); # OUTPUT: «Bye␤»
perl6/doc
…/Mu.pod6 :229:
say $o1; # OUTPUT: «Bar.new(foo => ["a", "b"], bar => {:a("b"), :c("d")})␤»
perl6/doc
…/Mu.pod6 :230:
say $o2; # OUTPUT: «Bar.new(foo => ["Z", "Y"], bar => {:X("W"), :Z("Y")})␤»
perl6/doc
…/Mu.pod6 :279:
say Mu.CREATE.defined; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :288:
"abc\n".print; # RESULT: «abc␤»
perl6/doc
…/Mu.pod6 :297:
"abc".put; # RESULT: «abc␤»
perl6/doc
…/Mu.pod6 :306:
say 42; # OUTPUT: «42␤»
perl6/doc
…/Mu.pod6 :318:
say 42 ~~ Mu; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :319:
say 42 ~~ Int; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :320:
say 42 ~~ Str; # OUTPUT: «False␤»
perl6/doc
…/Mu.pod6 :334:
say 42.WHICH eq 42.WHICH; # OUTPUT: «True␤»
perl6/doc
…/Mu.pod6 :356:
# OUTPUT: «Initiate a specified spell normally (do not use for class 7 spells)␤»
perl6/doc
…/Mu.pod6 :386:
dd f(); # OUTPUT: «any(1, 2, 3)␤»
perl6/doc
…/Mu.pod6 :424:
# OUTPUT: «(a : b : c)␤»
perl6/doc
…/Mu.pod6 :449:
# OUTPUT: «[2 3 4]␤»
perl6/doc
…/Mu.pod6 :463:
} # OUTPUT: «Verbose option detected in arguments␤»
perl6/doc
…/Mu.pod6 :476:
} # OUTPUT: «Verbose option not present in arguments␤»
perl6/doc
…/Mu.pod6 :485:
} # OUTPUT: «Verbose option not present in arguments␤»
perl6/doc
…/Nil.pod6 :17:
say Nil === Nil.new; # OUTPUT: «True␤»
perl6/doc
…/Nil.pod6 :25:
a().say; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :30:
sub a { }; a().say; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :31:
sub b { return }; b().say; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :32:
say (if 1 { }); # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :33:
{ ; }().say; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :34:
say EVAL ""; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :42:
(1, Nil, 3).elems.say; # OUTPUT: «3␤»
perl6/doc
…/Nil.pod6 :43:
(for Nil { $_ }).perl.say; # OUTPUT: «(Nil,)␤»
perl6/doc
…/Nil.pod6 :49:
say Nil.ITotallyJustMadeThisUp; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :50:
say (Nil)[100]; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :51:
say (Nil){100}; # OUTPUT: «Nil␤»
perl6/doc
…/Nil.pod6 :66:
$x.say; # OUTPUT: «(Int)␤»
perl6/doc
…/Nil.pod6 :71:
# OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $y; expected Int but got Any (Any)»
perl6/doc
…/Nil.pod6 :94:
$x.say; # OUTPUT: «(Any)␤»
perl6/doc
…/Nil.pod6 :97:
# OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $y; expected Int but got Any (Any)␤»
perl6/doc
…/Nil.pod6 :104:
$s.say; # OUTPUT: «(Str)␤»
perl6/doc
…/Nil.pod6 :112:
$x.say; # OUTPUT: «42␤»
perl6/doc
…/Num.pod6 :21:
say 2e300 ** 2e300; # OUTPUT: «Inf␤»
perl6/doc
…/Num.pod6 :22:
say (-1/0).Num; # OUTPUT: «-Inf␤»
perl6/doc
…/Num.pod6 :37:
say ∞²; # OUTPUT: «Inf␤»
perl6/doc
…/Num.pod6 :38:
say 42 + Inf === ∞; # OUTPUT: «True␤»
perl6/doc
…/Num.pod6 :39:
say atan ∞; # OUTPUT: «1.5707963267949␤»
perl6/doc
…/Num.pod6 :40:
say -∞ < 42 < ∞; # OUTPUT: «True␤»
perl6/doc
…/Num.pod6 :44:
say ∞/∞; # OUTPUT: «NaN␤»
perl6/doc
…/Num.pod6 :54:
say cos ∞; # OUTPUT: «NaN␤»
perl6/doc
…/Num.pod6 :55:
say (0/0).Num; # OUTPUT: «NaN␤»
perl6/doc
…/Num.pod6 :59:
say (0/0).isNaN; # OUTPUT: «True␤»
perl6/doc
…/Num.pod6 :60:
say (0/0).Num === NaN; # OUTPUT: «True␤»
perl6/doc
…/NumStr.pod6 :14:
my $f = <42.1e0>; say $f.^name; # OUTPUT: «NumStr␤»
perl6/doc
…/NumStr.pod6 :16:
As a subclass of both L«C<Num>
perl6/doc
…/NumStr.pod6 :35:
say +$f; # OUTPUT: «42.1␤»
perl6/doc
…/NumStr.pod6 :36:
say ~$f; # OUTPUT: «"forty two and a bit"␤»
perl6/doc
…/NumStr.pod6 :69:
say <5e0> ~~ "5.0"; # OUTPUT: «False␤»
perl6/doc
…/NumStr.pod6 :70:
say <5e0> ~~ 5.0 ; # OUTPUT: «True␤»
perl6/doc
…/NumStr.pod6 :71:
say <5e0> ~~ <5.0>; # OUTPUT: «True␤»
perl6/doc
…/NumStr.pod6 :85:
say $f cmp $g; # OUTPUT: «Less␤»
perl6/doc
…/NumStr.pod6 :86:
say $f.Str cmp $g.Str; # OUTPUT: «More␤»
perl6/doc
…/Numeric.pod6 :65:
say (4.0 + 0i).narrow.perl; # OUTPUT: «4␤»
perl6/doc
…/Numeric.pod6 :66:
say (4.0 + 0i).narrow.^name; # OUTPUT: «Int␤»
perl6/doc
…/Order.pod6 :19:
multi sub infix:«<=>»(Int:D \a, Int:D \b --> Order:D)
perl6/doc
…/Pair.pod6 :14:
X<
perl6/doc
…/Pair.pod6 :35:
# OUTPUT: «{:a1, :b2}␤»
perl6/doc
…/Pair.pod6 :39:
# OUTPUT: «Pair␤»
perl6/doc
…/Pair.pod6 :43:
# OUTPUT: «List␤»
perl6/doc
…/Pair.pod6 :49:
dd %h; # OUTPUT: «Hash %h = {:bar(10)}␤»
perl6/doc
…/Pair.pod6 :73:
say %(:42a) ~~ :42a; # OUTPUT: «True␤»
perl6/doc
…/Pair.pod6 :74:
say %(:42a) ~~ :10a; # OUTPUT: «False␤»
perl6/doc
…/Pair.pod6 :79:
say :42a ~~ :42a; # OUTPUT: «True␤»
perl6/doc
…/Pair.pod6 :80:
say :42z ~~ :42a; # OUTPUT: «True␤»
perl6/doc
…/Pair.pod6 :81:
say :10z ~~ :42a; # OUTPUT: «False␤»
perl6/doc
…/Pair.pod6 :84:
method to call on C<topic> and check's its L«C<.Bool>
perl6/doc
…/Pair.pod6 :89:
say "foo" .IO ~~ :f & :rw; # OUTPUT: «False␤»
perl6/doc
…/Pair.pod6 :90:
say "/tmp".IO ~~ :!f; # OUTPUT: «True␤»
perl6/doc
…/Pair.pod6 :91:
say "." .IO ~~ :f
perl6/doc
…/Pair.pod6 :102:
say $p.key; # OUTPUT: «Perl␤»
perl6/doc
…/Pair.pod6 :103:
say $p.value; # OUTPUT: «6␤»
perl6/doc
…/Pair.pod6 :114:
say $p.key; # OUTPUT: «Perl␤»
perl6/doc
…/Pair.pod6 :125:
say $p.value; # OUTPUT: «6␤»
perl6/doc
…/Pair.pod6 :138:
say $a cmp $b; # OUTPUT: «Less␤»
perl6/doc
…/Pair.pod6 :151:
# OUTPUT: «Earth is 1.000 AU away from the sun␤»
perl6/doc
…/Pair.pod6 :167:
say $p.kv[0]; # OUTPUT: «Perl␤»
perl6/doc
…/Pair.pod6 :168:
say $p.kv[1]; # OUTPUT: «6␤»
perl6/doc
…/Pair.pod6 :179:
say $p.pairs.^name; # OUTPUT: «List␤»
perl6/doc
…/Pair.pod6 :180:
say $p.pairs[0]; # OUTPUT: «Perl => 6␤»
perl6/doc
…/Pair.pod6 :192:
say $p.^name; # OUTPUT: «List␤»
perl6/doc
…/Pair.pod6 :193:
say $p.first; # OUTPUT: «Perl => 6␤»
perl6/doc
…/Pair.pod6 :194:
say $p.first.^name; # OUTPUT: «Pair␤»
perl6/doc
…/Pair.pod6 :207:
:foo<bar>.invert.perl.say; # OUTPUT: «(:bar("foo"),).Seq»
perl6/doc
…/Pair.pod6 :215:
# OUTPUT: «(:Perl("foo"), :is("foo"), :great("foo")).Seq»
perl6/doc
…/Pair.pod6 :218:
# OUTPUT: «((:a(42)) => "foo", (:b(72)) => "foo").Seq»
perl6/doc
…/Pair.pod6 :221:
L«C<.antipair> method
perl6/doc
…/Pair.pod6 :232:
say ('Perl' => 6).keys; # OUTPUT: «(Perl)␤»
perl6/doc
…/Pair.pod6 :243:
say ('Perl' => 6).values; # OUTPUT: «(6)␤»
perl6/doc
…/Pair.pod6 :256:
$p.say; # OUTPUT: «key => orange␤»
perl6/doc
…/Pair.pod6 :257:
$p.freeze.say; # OUTPUT: «orange␤»
perl6/doc
…/Pair.pod6 :260:
# OUTPUT: «X::Assignment::RO: Cannot modify an immutable Str␤»
perl6/doc
…/Pair.pod6 :272:
say $b.Str; # OUTPUT: «eggs 3␤»
perl6/doc
…/Parameter.pod6 :16:
say $param.type; # OUTPUT: «Str()␤»
perl6/doc
…/Parameter.pod6 :80:
say $sig.params[0].named; # OUTPUT: «False␤»
perl6/doc
…/Parameter.pod6 :81:
say $sig.params[1].named; # OUTPUT: «True␤»
perl6/doc
…/Parameter.pod6 :102:
say $sig.params[0].positional; # OUTPUT: «True␤»
perl6/doc
…/Parameter.pod6 :103:
say $sig.params[1].positional; # OUTPUT: «False␤»
perl6/doc
…/Parameter.pod6 :145:
f(17, "4711", 42); OUTPUT: «False␤True␤True␤»
perl6/doc
…/Parameter.pod6 :162:
# OUTPUT: «X::Assignment::RO: Cannot modify an immutable Int␤»
perl6/doc
…/Parameter.pod6 :182:
how_many_extra_positionals(0, 1, 2, 3); # RESULT: «
perl6/doc
…/Parameter.pod6 :183:
say &how_many_extra_positionals.signature.params[1].capture; # OUTPUT: «True␤»
perl6/doc
…/Parameter.pod6 :199:
say $sig.params[0].rw; # OUTPUT: «True␤»
perl6/doc
…/Parameter.pod6 :200:
say $sig.params[1].rw; # OUTPUT: «False␤»
perl6/doc
…/Parameter.pod6 :212:
say $sig.params[0].copy; # OUTPUT: «False␤»
perl6/doc
…/Parameter.pod6 :213:
say $sig.params[1].copy; # OUTPUT: «True␤»
perl6/doc
…/Parameter.pod6 :224:
say $sig.params[0].readonly; # OUTPUT: «False␤»
perl6/doc
…/Parameter.pod6 :225:
say $sig.params[1].readonly; # OUTPUT: «True␤»
perl6/doc
…/Parameter.pod6 :253:
a(8); # OUTPUT: «(Int)␤»
perl6/doc
…/Parameter.pod6 :254:
say &a.signature.params[0].type_captures; # OUTPUT: «(T U)␤»
perl6/doc
…/Parameter.pod6 :256:
a(8); # OUTPUT: «Int␤»
perl6/doc
…/Positional.pod6 :9:
Role for objects which support indexing them using C<postcircumfix:«[ ]»>
perl6/doc
…/PositionalBindFailover.pod6 :21:
say fifths($seq); # OUTPUT: «5␤»
perl6/doc
…/PositionalBindFailover.pod6 :46:
first-five Foo.new; # OUTPUT: # OUTPUT: «(42 Nil Nil Nil Nil)␤»
perl6/doc
…/Proc.pod6 :16:
say "Output was $captured-output.perl()"; # OUTPUT: «Output was "Hallo world\n"␤»
perl6/doc
…/Proc.pod6 :35:
# OUTPUT: «1 Hello,␤
perl6/doc
…/Proc.pod6 :47:
L«C<.slurp-rest>
perl6/doc
…/Promise.pod6 :17:
say $p.status; # OUTPUT: «Planned␤»
perl6/doc
…/Promise.pod6 :19:
say $p.status; # OUTPUT: «Kept␤»
perl6/doc
…/Promise.pod6 :82:
# OUTPUT: «timeout␤»
perl6/doc
…/Promise.pod6 :187:
say $p.status; # OUTPUT: «Broken␤»
perl6/doc
…/Promise.pod6 :188:
say $p.cause; # OUTPUT: «sorry␤»
perl6/doc
…/Promise.pod6 :243:
say $p.status; # OUTPUT: «Kept␤»
perl6/doc
…/Proxy.pod6 :26:
say $doubled; # OUTPUT: «8␤»
perl6/doc
…/PseudoStash.pod6 :20:
#OUTPUT: «42␤»
perl6/doc
…/Range.pod6 :36:
for 1..5 { .say }; # OUTPUT: «1␤2␤3␤4␤5␤»
perl6/doc
…/Range.pod6 :37:
('a' ^..^ 'f').list; # RESULT: «'b', 'c', 'd', 'e'»
perl6/doc
…/Range.pod6 :38:
5 ~~ ^5; # RESULT: «False»
perl6/doc
…/Range.pod6 :39:
4.5 ~~ 0..^5; # RESULT: «True»
perl6/doc
…/Range.pod6 :40:
(1.1..5).list; # RESULT: «(1.1, 2.1, 3.1, 4.1)»
perl6/doc
…/Range.pod6 :60:
.say for @numbers[$range]; # OUTPUT: «4␤8␤15␤»
perl6/doc
…/Range.pod6 :62:
.say for @numbers[@range]; # OUTPUT: «4␤8␤15␤»
perl6/doc
…/Range.pod6 :73:
say (1..5).min; # OUTPUT: «1␤»
perl6/doc
…/Range.pod6 :74:
say (1^..^5).min; # OUTPUT: «1␤»
perl6/doc
…/Range.pod6 :83:
say (1..5).excludes-min; # OUTPUT: «False␤»
perl6/doc
…/Range.pod6 :84:
say (1^..^5).excludes-min; # OUTPUT: «True␤»
perl6/doc
…/Range.pod6 :92:
say (1..5).max; # OUTPUT: «5␤»
perl6/doc
…/Range.pod6 :93:
say (1^..^5).max; # OUTPUT: «5␤»
perl6/doc
…/Range.pod6 :102:
say (1..5).excludes-max; # OUTPUT: «False␤»
perl6/doc
…/Range.pod6 :103:
say (1^..^5).excludes-max; # OUTPUT: «True␤»
perl6/doc
…/Range.pod6 :111:
say (1..5).bounds; # OUTPUT: «(1 5)␤»
perl6/doc
…/Range.pod6 :112:
say (1^..^5).bounds; # OUTPUT: «(1 5)␤»
perl6/doc
…/Range.pod6 :120:
say (1..5).infinite; # OUTPUT: «False␤»
perl6/doc
…/Range.pod6 :121:
say (1..*).infinite; # OUTPUT: «True␤»
perl6/doc
…/Range.pod6 :129:
say ('a'..'d').is-int; # OUTPUT: «False␤»
perl6/doc
…/Range.pod6 :130:
say (1..^5).is-int; # OUTPUT: «True␤»
perl6/doc
…/Range.pod6 :131:
say (1.1..5.5).is-int; # OUTPUT: «False␤»
perl6/doc
…/Range.pod6 :157:
say $r1.is-int, ', ', $r2.is-int; # OUTPUT: «True, True␤»
perl6/doc
…/Range.pod6 :158:
say $r1.excludes-min, ', ', $r2.excludes-min; # OUTPUT: «False, True␤»
perl6/doc
…/Range.pod6 :159:
say $r1.minmax, ', ', $r2.minmax; # OUTPUT: «(1 5), (2 5)␤»
perl6/doc
…/Range.pod6 :162:
say $r3.is-int, ', ', $r4.is-int; # OUTPUT: «False, False␤»
perl6/doc
…/Range.pod6 :163:
say $r3.excludes-max, ', ', $r4.excludes-max; # OUTPUT: «False, True␤»
perl6/doc
…/Range.pod6 :164:
say $r3.minmax; # OUTPUT: «(1.1 5.2)␤»
perl6/doc
…/Range.pod6 :167:
# OUTPUT: «X::AdHoc: Cannot return minmax on Range with excluded ends␤»
perl6/doc
…/Range.pod6 :177:
say (1..5).elems; # OUTPUT: «5␤»
perl6/doc
…/Range.pod6 :178:
say (1^..^5).elems; # OUTPUT: «3␤»
perl6/doc
…/Range.pod6 :186:
say (1..5).list; # OUTPUT: «(1 2 3 4 5)␤»
perl6/doc
…/Range.pod6 :187:
say (1^..^5).list; # OUTPUT: «(2 3 4)␤»
perl6/doc
…/Range.pod6 :227:
say (1^..5).reverse; # OUTPUT: «(5 4 3 2)␤»
perl6/doc
…/Range.pod6 :228:
say ('a'..'d').reverse; # OUTPUT: «(d c b a)␤»
perl6/doc
…/Range.pod6 :229:
say (1..Inf).reverse; # OUTPUT: «(Inf Inf Inf ...)␤»
perl6/doc
…/Rat.pod6 :31:
say approx-sqrt(2, 5).^name; # OUTPUT: «Rat␤»
perl6/doc
…/Rat.pod6 :32:
say approx-sqrt(2, 10).^name; # OUTPUT: «Num␤»
perl6/doc
…/Rat.pod6 :52:
say (1/3).perl; # OUTPUT: «<1/3>␤»
perl6/doc
…/Rat.pod6 :53:
say (2/4).perl; # OUTPUT: «0.5␤»
perl6/doc
…/RatStr.pod6 :14:
my $f = <42.1>; say $f.^name; # OUTPUT: «RatStr␤»
perl6/doc
…/RatStr.pod6 :16:
As a subclass of both L«C<Rat>
perl6/doc
…/RatStr.pod6 :35:
say +$f; # OUTPUT: «42.1␤»
perl6/doc
…/RatStr.pod6 :36:
say ~$f; # OUTPUT: «"forty two and a bit"␤»
perl6/doc
…/RatStr.pod6 :69:
say <5.0> ~~ "5"; # OUTPUT: «False␤»
perl6/doc
…/RatStr.pod6 :70:
say <5.0> ~~ 5 ; # OUTPUT: «True␤»
perl6/doc
…/RatStr.pod6 :71:
say <5.0> ~~ <5>; # OUTPUT: «True␤»
perl6/doc
…/RatStr.pod6 :85:
say $f cmp $g; # OUTPUT: «Less␤»
perl6/doc
…/RatStr.pod6 :86:
say $f.Str cmp $g.Str; # OUTPUT: «More␤»
perl6/doc
…/Rational.pod6 :77:
say $non-rep; # OUTPUT: «6.␤»
perl6/doc
…/Rational.pod6 :78:
say $repeating; # OUTPUT: «3␤»
perl6/doc
…/Rational.pod6 :79:
printf '%s(%s)', $non-rep, $repeating; # OUTPUT: «6.(3)»
perl6/doc
…/Rational.pod6 :85:
say (5/2).base-repeating(10).perl; # OUTPUT: «("2.5", "")␤»
perl6/doc
…/Real.pod6 :75:
A special value of L«C<Whatever>
perl6/doc
…/Real.pod6 :85:
say pi.base(10, 3); # OUTPUT: «3.142␤»
perl6/doc
…/Real.pod6 :86:
say (1/128).base(10, *); # OUTPUT: «0.0078125␤»
perl6/doc
…/Real.pod6 :87:
say (1/100).base(10, *); # OUTPUT: «0.01␤»
perl6/doc
…/Real.pod6 :90:
For reverse operation, see L«C<parse-base>
perl6/doc
…/Regex.pod6 :26:
say &R.^name; # OUTPUT: «Regex␤»
perl6/doc
…/Regex.pod6 :31:
say $match.Bool; # OUTPUT: «True␤»
perl6/doc
…/Regex.pod6 :32:
say $match.orig; # OUTPUT: «abc␤»
perl6/doc
…/Regex.pod6 :33:
say $match.Str; # OUTPUT: «ab␤»
perl6/doc
…/Regex.pod6 :34:
say $match.from; # OUTPUT: «0␤»
perl6/doc
…/Regex.pod6 :35:
say $match.to; # OUTPUT: «2␤»
perl6/doc
…/Routine.pod6 :30:
f(); # OUTPUT: «"Hello there"␤»
perl6/doc
…/Routine.pod6 :70:
say &foo.multi; # OUTPUT: «False␤»
perl6/doc
…/Routine.pod6 :71:
say &foo.candidates».multi; # OUTPUT: «(True)␤»
perl6/doc
…/Routine.pod6 :89:
# OUTPUT: «(Cool $: Str $matcher, $limit = Inf, *%_)␤»
perl6/doc
…/Routine.pod6 :118:
say (sub f() { ... }).yada; # OUTPUT: «True␤»
perl6/doc
…/Routine.pod6 :119:
say (sub g() { 1; }).yada; # OUTPUT: «False␤»
perl6/doc
…/Routine.pod6 :231:
# WARNING: «Useless use of "double(21)" in expression "double(21)" in sink context (line 2)»
perl6/doc
…/Scalar.pod6 :34:
$a.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :35:
$a.VAR.^name.say; # OUTPUT: «Scalar␤»
perl6/doc
…/Scalar.pod6 :37:
$b.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :38:
$b.VAR.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :44:
@a[0].^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :45:
@a[0].VAR.^name.say; # OUTPUT: «Scalar␤»
perl6/doc
…/Scalar.pod6 :46:
[1, 2, 3][0].^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :47:
[1, 2, 3][0].VAR.^name.say; # OUTPUT: «Scalar␤»
perl6/doc
…/Scalar.pod6 :48:
(1, 2, 3)[0].^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :49:
(1, 2, 3)[0].VAR.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :57:
[1, $(2, 3)].perl.say; # OUTPUT: «[1, (2, 3)]␤»
perl6/doc
…/Scalar.pod6 :58:
(1, $(2, 3)).perl.say; # OUTPUT: «(1, $(2, 3))␤»
perl6/doc
…/Scalar.pod6 :69:
$a.say; # OUTPUT: «2␤»
perl6/doc
…/Scalar.pod6 :79:
c.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :80:
c.VAR.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :83:
d.^name.say; # OUTPUT: «Int␤»
perl6/doc
…/Scalar.pod6 :84:
d.VAR.^name.say; # OUTPUT: «Scalar␤»
perl6/doc
…/Scalar.pod6 :88:
# OUTPUT: «X::Assignment::RO: Cannot modify an immutable Int␤»
perl6/doc
…/Scalar.pod6 :219:
say $x.VAR.of.^name; # OUTPUT: «Cool»
perl6/doc
…/Seq.pod6 :36:
# OUTPUT: «X::Seq::Consumed: This Seq has already been iterated, and its values consumed
perl6/doc
…/Seq.pod6 :120:
say (1..5).map({$_}).skip; # OUTPUT: «(2,3,4,5)␤»
perl6/doc
…/Seq.pod6 :121:
say (1..5).map({$_}).skip(3); # OUTPUT: «(4,5)␤»
perl6/doc
…/Seq.pod6 :122:
say (1..5).map({$_}).skip(5); # OUTPUT: «()␤»
perl6/doc
…/Seq.pod6 :123:
say (1..5).map({$_}).skip(-1); # OUTPUT: «(1,2,3,4,5)␤»
perl6/doc
…/Set.pod6 :19:
say $fruits.elems; # OUTPUT: «3␤»
perl6/doc
…/Set.pod6 :20:
say $fruits.keys.sort; # OUTPUT: «apple orange peach␤»
perl6/doc
…/Set.pod6 :28:
say $fruits<apple>; # OUTPUT: «True␤»
perl6/doc
…/Set.pod6 :29:
say $fruits<kiwi>; # OUTPUT: «False␤»
perl6/doc
…/Set.pod6 :38:
say $n.keys.perl; # OUTPUT: «(:two(2), :zero(0), :one(1)).Seq␤»
perl6/doc
…/Set.pod6 :39:
say $n.keys.map(&WHAT); # OUTPUT: «((Pair) (Pair) (Pair))␤»
perl6/doc
…/Set.pod6 :49:
say $n.keys.perl; # OUTPUT: «("one", "two").Seq␤»
perl6/doc
…/Set.pod6 :50:
say $n.keys.map(&WHAT); # OUTPUT: «((Str) (Str))␤»
perl6/doc
…/Set.pod6 :57:
say (1..5) (^) 4; # OUTPUT: «set(1, 2, 3, 5)␤»
perl6/doc
…/Set.pod6 :68:
say $a (<) $b; # OUTPUT: «False␤»
perl6/doc
…/Set.pod6 :69:
say $a (&) $b; # OUTPUT: «set(2)␤»
perl6/doc
…/Set.pod6 :70:
say $a (^) $b; # OUTPUT: «set(1, 3, 4)␤»
perl6/doc
…/Set.pod6 :73:
say $a ⊂ $b; # OUTPUT: «False␤»
perl6/doc
…/Set.pod6 :74:
say $a ∩ $b; # OUTPUT: «set(2)␤»
perl6/doc
…/Set.pod6 :75:
say $a ⊖ $b; # OUTPUT: «set(1, 3, 4)␤»
perl6/doc
…/SetHash.pod6 :19:
say $fruits.elems; # OUTPUT: «3␤»
perl6/doc
…/SetHash.pod6 :20:
say $fruits.keys.sort; # OUTPUT: «apple orange peach␤»
[perl6/doc
…/SetHash.pod6 :31:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment