in reply to split empty (lead|trail)ing fields
Because split throws away the parts that matched unless you tell it to keep them,
It turns out that capturing forces one element before the separator. ':' is in the second array slot.perl -e'print scalar split /(:)/, q(:)' 2
After Compline,
Zaxo
|
|---|