On Tue, 10 Dec 2002 16:08:25 -0500, Joseph F. Ryan wrote: > Peter Haworth wrote: > > >On Thu, 05 Dec 2002 15:17:57 -0500, Joseph F. Ryan wrote: > > > >>Again, C<< "STRING".split(' ') >> is different than > >> C<< "STRING".split(/\s+/) >>. The latter will add an empty element to the > >>beginning of the string if there is leading whitespace, which is not the > >>behaivor <<>> will have (if it acts like qw(), at any rate.) > > > >I hate this special case. Why is there no way of specifying the removal > >of leading empty elements with any other separator string? > > Given that strings and regular expressions are different types of objects, > maybe the "single whitespace" rule could be extended to any single > character delimeter
That's still an unchangeable special case. In some circumstances, I might want leading empty fields when I specify space as the separator, and in others I might want them stripped with any random separator string or regex. There needs to be a way to explicitly specify whether leading blanks are required. -- Peter Haworth [EMAIL PROTECTED] "I think that was lobotomy rather than trepanation wasn't it? Important to understand the difference if you're considering trepanning yourself at home" -- Robin Houston