NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Re: (Score:1)
Took me some staring and blinking until I noticed what the regex was doing with the
\Gbut no/gdespite a loop. This is clearer:It might be personal bias that I hate doing string concatenations in a loop, but this seems to be a case where the
xoperator is a natural fit.(Your final regex isn't precompiled, btw. I don't know if you are aware of that.)
I'm not sure the output I'm seeing either way is intended, though? It simply lists all possible ways to split this string, twice, but doesn't do what I'd expect when I hear “permutations.”
Reply to This