I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not yet
implemented error when I connect to a web-server using the User-Agent. This
happens when I pass in the Hostname and Portnumber as parameters in my
function. However, if I hard-code the Server-name and port number it seems
to work fine. I've included the piece of causing the problem below. Does
anyone have suggestion why this is happening?


    my ( $Host, $Port ) = @_;
    my $url = "$Host:$Port";             #Does not work
    #my $url = "http://servername:80";    #This works
    
    require LWP::UserAgent;
    my $ua = LWP::UserAgent->new(env_proxy => 0,
                              keep_alive => 0,
                              timeout => 30,
                             );

    $response = $ua->get( $url );

Thanks in Advance,

Rajesh Dorairajan 

Reply via email to