No doubt there's a cleaner way of doing this, but my first thought is to count the number of backslashes, and then take two array slices from the split results, and join them back up again with backslashes.
my $nr_slash = $include =~ tr/\\//;
my $share = join( '\\', (split /\\/, $include)[0..3]);
my $path = '\\' . join( '\\', (split /\\/, $include)[4..$nr_slash]);