in reply to replacing text file separators in regex

How about this?
$url=~ m|^(\w+):/*((.*\@)?[^/]+)/(.*)$|; $protocol= uc($1); $site= $2; $path= $4;

That would accept everything up till the last '@' as part of the site regardless of any '/' characters that it might contain.

UPDATE: Corrected the '@' that needed escaped