As a gentle reminder, an answer to this question was also provided by Sean Clarke here . In case you are looking for a function that does not ask for preprocessing, here is a possible approach:
mySplit[list__?VectorQ] := Block[
{llist = {list}, templist = Sort@Join@list, range, indexedlist, indices, sortby, endpos},
range = Range[Length@llist];
indexedlist = Sort[(Sequence @@ Transpose[{llist[[#]], ConstantArray[#, Length@llist[[#]]]}]) & /@ range];
indices = indexedlist[[All, 2]];
sortby[{}] = {};
sortby[l_] := Block[{temprange = range, ctr = 1},
While[ctr <= Length@l && MemberQ[temprange, l[[ctr]]], temprange[[l[[ctr++]]]] = 0];
{--ctr, Sequence @@ sortby[Drop[l, ctr]]}];
endpos = Accumulate@sortby[indices];
MapThread[templist[[#1 ;; #2]] &, {Prepend[Most@endpos, 0] + 1, endpos}]
];
For your inputs
p = {1, 3, 8} ; q = {2, 7} ; r = {0, 4, 5, 9} ;
we get
mySplit[p, q, r]
(* {{0, 1, 2}, {3, 4}, {5, 7, 8}, {9}} *)
This function should work for any number of lists, without any particuliar condition regarding their elements (e.g., a given number can appear several times in a same list and be in other lists as well). Note that the output depends on the order according to which the arguments are given, because of the way Join and Sort work together. For instance considering the lists
a = {0, 5, 3} ; b = {2, 1} ; c = {3, 4, 5, 0, 0, 0} ;
we obtain
mySplit[a, b, c]
(* {{0, 0}, {0}, {0, 1}, {2, 3, 3}, {4, 5}, {5}} *)
mySplit[b, c, a]
(* {{0}, {0}, {0, 0, 1}, {2, 3, 3}, {4}, {5, 5}} *)