in reply to Re: Re: regex needed
in thread regex needed

I'm not sure there's any guarantee perl will do that optimization for you.
Yes it's garanteed. I'll just have to find the proper documentation for you... Ah, here it is, in perldoc -f split:
When assigning to a list, if LIMIT is omitted, Perl supplies a LIMIT one larger than the number of variables in the list, to avoid unnecessary work.
Therefore, with two scalars on the left hand side (of which one variable, and undef), Perl will split into 3 parts.