subscript adverb :v

Documentation for subscript adverb :v assembled from the following types:

language documentation Subscripts

From Subscripts

(Subscripts) subscript adverb :v

Return the bare value of the element (rather than potentially returning a mutable value container), and silently skip nonexistent elements:

my @tens = 0102030;
say @tens[1]:v;        # OUTPUT: «10␤» 
say @tens[042]:v;  # OUTPUT: «(0, 20)␤» 
@tens[3= 31;         # OK 
@tens[3]:v = 31;       # ERROR, Cannot modify an immutable Int (31) 
 
my %month = Jan => 1Feb => 2Mar => 3;
say %month<Feb>:v;          # OUTPUT: «2␤» 
say %month<Jan Foo Mar>:v;  # OUTPUT: «(1 3)␤» 

If you don't want to skip nonexistent elements, use the negated form:

say %month<Jan Foo Mar>:!v;  # OUTPUT: «(1 (Any) 3)␤» 

See also the values routine.