in reply to split strangeness
to make the parens non-capturingmy @array = split(/,(\s+|)/, $string); # change to my @array = split(/,(?:\s+|)/, $string);
Update Zaxo's is much better in practice... but if you ever do need grouping, (?: ) will not capture like ( ) will
- Ant
- Some of my best work - Fish Dinner
|
|---|