in reply to split versus =~
Demo in debugger using perl -de0
DB<4> x split /(?<!^)-/, "X-Y-Z" 0 'X' 1 'Y' 2 'Z' DB<5> x split /(?<!^)-/, "-X-Y-Z" 0 '-X' 1 'Y' 2 'Z' DB<6>
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
|
|---|