Re: bug in URI::URL:url ?

Randal Schwartz (merlyn@stonehenge.com)
28 Sep 1996 19:17:39 -0700


>>>>> "Otis" == Otis Gospodnetic <otisg@panther.middlebury.edu> writes:

Otis>     $u = new URI::URL($url);
Otis>     print "Protocol scheme is ", $u->scheme, "\n";
Otis>     print "Host is $u->host\n";

Otis> output produced:

Otis> Protocol scheme is http
Otis> Host is http://www.middlebury.edu/->host


Otis> maybe I'm mistaken, but shouldn't $u->host get interpolated when inside of ""
Otis> in a print statement ?

You are mistaken. :-)

Only variables get interpolated.  Not expressions.  Otherwise,
where would you put the backslash when you write "1 + 2 = 3"? :-)


Otis> this statement is causing weird problems, and according to docs it should work:

Otis>    if (!$ua->visited{'www.middlebury.edu'}) {
Otis> 	...
Otis> 	...
Otis>    }

Otis> the error I get is:

Otis> Can't use subscript on subroutine entry at /home/its/otisg/bin/Pauk line 48,
Otis> near "'www.middlebury.edu'}"
Otis> (Did you mean $ or @ instead of &?)

I bet that "!" has too high of precedence.  Try "not".  Then again,
that's just a wild guess.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me