Re: Can't locate object method get via package LWP::UserAgent
[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=msftf=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]
RE: Can't locate object method get via package LWP::UserAgent
I haven't seen where you said: use LWP::UserAgent; José. -Original Message- From: PerlDiscuss - Perl Newsgroups and mailing lists [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:50 AM To: [EMAIL PROTECTED] Subject: Can't locate object method get via package LWP::UserAgent #!/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=msftf=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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]