in reply to Re: place holder
in thread place holder

  1. Many options, but basically you must account for the difference between substrings and stand-alone strings, and this appears to be whitespace in your example data, hence something like:
    s/(?<=\s)-([bc]\s)/-:$1/g;
  2. You can stop split from continuing using the 3rd argument:
    split( '\s', 'a b c', 2);
    though if there may be leading whitespace before the 'a' you'd better use the special case of splitting on a single space, which will discard any leading whitespace:
    split( ' ', '  a b c', 2);

--
I'd like to be able to assign to an luser