in reply to Re: Net::FTP - syntax with username containing /
in thread Net::FTP - syntax with username containing /
$url=~ /^(\w+):\/*([^\/]+)\/(.*)$/;
The way I'm reading this is: between /^(\w+) is $protocol, between \/*([^\/]+) is $site, and \/(.*)$ is $path.
So, based on the above, if I use a comma separator for the $site portion, the line should look like:
and the appropriate line in my text file looks like:$url=~ /^(\w+):\/*([^\/]+),(.*)$/;
ftp://XX/yyyy@123.456.789.012,/
However, when I then run the script, I get several "uninitalized value" errors, one for the pattern match ($site=~ /\@/), one for a line trying to use $host, the other for a line trying to use $path.
Just for kicks, I tried substituting a comma wherever there was \/, but I got minor variations on the above errors. I also tried substituting \; , but that didn't seem to make a difference.
So, any help appreciated - if I can learn something about regexs today I will be happy.
Thanks,
Glenn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Net::FTP - syntax with username containing /
by Anonymous Monk on Jul 04, 2002 at 21:37 UTC |