[EMAIL PROTECTED] wrote:
> Modified: doc/trunk/design/syn/S03.pod
> ==============================================================================
> ...
> +Alternately, you can increment a submatch:
> +
> + $filename ~~ s[^.* <(\w+)> \.\w+$] = $().succ;
> +
Don't you want the leading .* to be non-greedy? I.e., shouldn't that read
$filename ~~ s[^.*? <(\w+)> \.\w+$] = $().succ;
instead? Because it seems like the way it's written would increment "my-xyz.txt"
to "my-xyaa.txt" instead of "my-xza.txt", and I think the latter is what you'd want.
Or did * become non-greedy while I wasn't looking?
=thom
There are three ways to get something done: do it yourself, hire someone, or
forbid your kids to do it.