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

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]);


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'