On 2/2/07, Gauthier, Dave <[EMAIL PROTECTED]> wrote:

Getting unwanted list elements when using split with regex.  Here's an
example....

@arr = split(/[a-zA-Z0-9]/,$str);

Your separator is a single character. Did you want to split on runs of
one or more single characters?

  /[a-zA-Z0-9]+/

And is there a reason you're not using the obvious shortcut?

   /\w+/

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to