The delimiter in a split is a regex. So you can specify
Code:
my @stuff = split(/[,| ]/, $string);
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
Arrgh. Clicked on the VBA forum instead of the perl one, then gave you a perl answer. What a plonker...
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
.. but wouldn't it be nice if Split did work that way
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.