$s = '\\Server\user\dir'; @tmp = split /\\+/, $s; print join(" -- ", @tmp);