On Fri, May 22, 2009 at 8:22 AM, Uri Guttman <[email protected]> wrote: >>>>>> "SB" == Samuel Baldwin <[email protected]> writes: > > SB> A bit of a side question; when would you ever want to try and match an > SB> empty regex? Wouldn't it be semantically saner to use defined? > > i did mention a common use in split( //, ... ). that explodes a string > into an array of all the chars which is useful sometimes. and that is > always an null regex afaik. it has the same effect as m/(.)/s in a list > context.
You wanted m/./sg. Without the g it only gives you 1 character. Personally I find the split version clearer. Ben _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

