<[EMAIL PROTECTED]> wrote:
>
> #!/usr/bin/perl
>
> use strict;
> use URI;
> #use HTTP::Request::Common qw(GET);
> use LWP;
> #use HTTP::Response;
>
> my $browser = LWP::UserAgent->new;
> $browser->env_proxy();
> my
> $response=$browser->get('http://finance.yahoo.com/d/quotes.csv?s=msft&f=sl1d1t1c1ohgv');
> print $response->content;
>
> Can someone please tell me how to solve this error message when i type
> perl test.pl at the prompt. test.pl is the filename
>
> Can't locate object method "get" via package "LWP::UserAgent"

Hi. It's always nice to put a name on your post so that we can
talk to you.

The code you've posted above worked fine straight from the box.

I got the output

"MSFT",25.54,"11/25/2003","2:08pm",-0.19,25.87,25.95,25.43,57003064

which I guess is right.

You may have an old version of LWP, but since all it really does
is to check your current version number and load LWP::UserAgent
it shouldn't be a problem. Try replacing

  use LWP;

with

  use LWP::UserAgent;

and see what you get.

HTH,

Rob






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to