# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #129596]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129596 >


# I have the fix; filing for records

The .subst-mutate routine returns a Match object (or Nil) on singular 
operations or a List of Match objects when :g/:global is used, as that produces 
several matches.

The :x option also produces several matches:

m: say "1234567".match: /\d/, :x(5)
rakudo-moar c01fc3: OUTPUT«(「1」 「2」 「3」 「4」 「5」)␤

However, only a single match object is returned when that option is used with 
.subst-mutate, even though the option does have the desired effect on the 
substitutions:

m: my $x = "1234567"; say $x.subst-mutate: /\d/, '', :x(5); say $x
rakudo-moar c01fc3: OUTPUT«「1」␤67␤»

Reply via email to