in reply to Split by "//"
#!/usr/bin/perl my $test='\\\\server\\share//folder/subfolder'; my ($share,$dir) = split(m!//!, $test); print $share, " .. " , $dir; __END__ \\server\share .. folder/subfolder
You can either escape the '/'s inside the regexp, or give an explizit 'm' and use whatever you like as regexp-delimiter, as I have done in the snippet above
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|