in reply to Getting server share and path from a Microsoft UNC

This would be the line of code you are looking for,
my ($network, $path) = split (/(?<!\\)\\(?!\\)/, $include, 2);
Here is how it works:
The regex consists of three tokens, the first token (?<!\\) is a zero width negative look behind. It makes sure that we don't have a backslash before our matching pattern, but it doesn't match it. Next we have \\ which matches a \. Finally there is (?!\\) and that does a zero width look ahead. Like the look behind, it makes sure we don't have a backslash following our pattern, but it doesn't match against it.

The 2 at the end of the split tells split to return a max of 2 elements (network and path). If this wasn't set, then we would split on every '\' (but we wouldn't split on '\\').