variable $<named>

Documentation for variable $<named> assembled from the following types:

variable $/

From $/

($/) variable $<named>

$/ can have named attributes if the Regex had named capture-groups in it, or if the Regex called out to another Regex.

'I.... see?' ~~ / \w+ $<punctuation>=[ <-[\w\s]>+ ] \s* $<final-word> = [ \w+ . ] /;
say $/<punctuation># OUTPUT: «「....」␤» 
say $/<final-word>;  # OUTPUT: «「see?」␤» 

These can also be accessed by the shortcut $<named>.

say $<punctuation># OUTPUT: «「....」␤» 
say $<final-word>;  # OUTPUT: «「see?」␤» 

To get all of the named attributes, you can use $/.hash or %$/. In 6.c language, you can also use the %() shortcut (no spaces inside the parentheses).

say %$/.join;       # OUTPUT: «"punctuation  see?"␤» 
# 6.c language only 
say %().join;       # OUTPUT: «"punctuation  see?"␤»