Documentation for method orig
assembled from the following pages:
Class: Match §
From Match
(Match) method orig §
Defined as:
method orig()
Returns the original input to the regex engine, which is usually a string, but doesn't need to be (could be anything that can be coerced to a string):
42 ~~ /.+/;say $/.orig; # OUTPUT: «42» say $/.orig.^name; # OUTPUT: «Int»
See method target for a close equivalent that always returns a string.