That only works in the "path" part doesn't contain "\". For example, this is a valid UNC path:
\\server\share\subdir1\subsubdir1 Your suggestion would only get server and share. -Peter -----Original Message----- From: Johannes Studt To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 5/13/2002 3:52 PM Subject: RE: regular expression help > Let's say that I'm given \\Server\Pathname as a text. How would I extract > "\\Server" from this and store it to a variable $server? $str = '\\server\path'; (undef, $server, $path) = split (/\\/, $str); print 'Server=', $server, ' Path=', $path; Johannes _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
