local our $length; $x =~ /(\d+)(?{ $length = length($1) })$/; #### local our $length; $x =~ /(\d+)(?{ $length = length($^N) })$/;