Dec 13, 2000, 8:07 AM
Post #1 of 2
How do I make the following line not ignore zero-length strings? Or if someone has a procedure that does this, that would be great!!
need to split without ignoring zero-length strings
@otherchoices = split(/\|/, $choices);
I have a $choices= '|ASDF|ERTY|SDFGH' and I need: "", "ASDF", "ERTY" and "SDFGH"
The Python split does what I want, but that isn't an option, unless you know if perl can call python. How would I do that? Putting a space isn't an option either, it needs to be a zero-length string.
Where can I go to find information?
Thanks for responding!!