note
parv
<p>In case of input of "2L", <c>\w*</c> eats the "2". As input string does not have an optional dot, you are left with "L" as required by <c>\S+</c>, which is then printed.
</p>
<p>Given the example strings, make preceding word letters AND the dot a single combination which is optional: <c>m/ (?: \w+[.] )? (\S+) /x</c>.
</p>
726738
726738