Newbie URI::URL question 
Author Message
 Newbie URI::URL question

I'm trying to understand how the URI::URL module works with this
simple program. Apparently I do not understand the user and
password uses, and I need to to be able to write an LWP program
that will get past my company's firewall. Can someone tell me
what I am doing wrong?

The program:

#!/apps/SunOS/5/bin/perl -w
#
use URI::URL;
#
$url = new URI::URL(

#
#
$myurl =  $url->as_string();
print "The whole enchilada: $myurl\n";
#
$myscheme = $url->scheme();
print "Scheme: $myscheme\n";
#
$mynetloc = $url->netloc();
print "Netloc: $mynetloc\n";
#
$myuser = $url->user;
print "User: $myuser\n";
#
$mypass = $url->password();
print "Password: $mypass\n";
#
$myhost = $url->host();
print "Host: $myhost\n";
#
$myport = $url->port();
print "Port: $myport\n";
#
$mypath = $url->path();
print "Path: $mypath\n";


The output is

The whole enchilada:

Scheme: http

Use of uninitialized value at ./testURL.pl line 18.
User:
Use of uninitialized value at ./testURL.pl line 21.
Password:
Host: www.foobar.com
Port: 8080
Path: /homepage.html
Use of uninitialized value at ./testURL.pl line 33.
Use of uninitialized value at ./testURL.pl line 33.
Use of uninitialized value at ./testURL.pl line 33.
Use of uninitialized value at ./testURL.pl line 33.
Use of uninitialized value at ./testURL.pl line 33.
Use of uninitialized value at ./testURL.pl line 33.
URL elements: http; myuser; mypass; www.foobar.com; 8080;
/homepage.html; ; ;

Thanks!

Andrew Robinson
--

Amoco Corporation                      phone: (504) 586-6888
New Orleans, LA                          fax: (504) 586-2637
-----
The events depicted herein are fictional. Any similarity to
persons living or dead is entirely...oops, wrong disclaimer



Sun, 10 Dec 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Newbie URI::URL question

2. URI:: URL Question

3. Question about the URI::URL module

4. Question about the URI::URL module

5. URI::URL module question

6. URI::URL module

7. URI::URL and FILE::BASENAME???????????????

8. Looking for advice on using URL::URI module

9. URI::URL 3.00 released

10. weird behavior with URI::URL

11. URI::URL

12. how to use URI::URL ?

 

 
Powered by phpBB® Forum Software