On Monday, December 15, 2003 03:05, John W. Krahn wrote: >Here is a little quiz for you beginners out there. split() treats its >first argument as a regular expression. There are TWO exceptions where >the first argument does not behave the same as a normal regular >expression. What are they?
The first one that comes to mind is using // for your search. Rather than repeating the last search, it searches for the null string to split on. The second one is if you include parentheses in your regex. If you put parentheses around your regex, then split will create entries for each of the matched terms in addition to the just the "splitted" items. So, do I win a prize or something? :) Alan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>