- $ parrot perl6.pbc
- > rule Foo { (\d+) }
- > "1234 x" ~~ Foo; say $/;
- 1234
- > "1234 x" ~~ Foo; say @($/);
- 1234
- > "1234 x" ~~ Foo; say @($/).WHAT;
- List
- > "1234 x" ~~ Foo; say @($/).elems;
- Method 'elems' not found for invocant of class 'ResizablePMCArray'
- > # wtf?!
- > say [1,2,3,4].elems
- 4
- > say <1 2 3 4>.elems
- 4
- $
I can't take the length of a List of positional captures, because internals are poking out of the Match.
