in reply to RE: split function not working as expected[SOLVED]
G'day lonewolf28,
If you look at the documentation for the split function, you'll see that the first argument to split is a "PATTERN".
Your "PATTERN" is: zero-length-string OR zero-length-string
And, with the last part being totally redundant, just: zero-length-string
The output is entirely to be expected. The split documentation discusses outcomes with zero-length patterns.
A better "PATTERN" would be: /[|]/
See also: Perl Regular Expressions Tutorial
— Ken
|
|---|