- 论坛徽章:
- 0
|
flw 注:因为你的程序没有 code,导致出现表情符,为了查看您的源代码,所以编辑了您的帖子。请谅解!
- #!/usr/bin/perl
- my $sQuery = 'bus';
- my $oSearch = new WWW::Search::('yahoo');
- $oSearch->;native_query(WWW::Search::escape_query($sQuery));
- # $oSearch->;login($sUser, $sPassword);
- while (my $oResult = $oSearch->;next_result())
- {
- print $oResult->;url, "\n";
- } # while
- $oSearch->;logout;
复制代码
错误提示:
Can't locate object method "new" via package "WWW::Search" at search.pl line 4
我错了吗,我装了模块了:
+++++++++++++++++++++++++
ppm>; query w
Querying target 1 (ActivePerl 5.8.6.811)
1. libwin32 [0.24] A collection of extensions that aims to prov~
2. libwww-perl [5.801] Library for WWW access in Perl
3. LWP-Simple-Cookies [0.01] adds cookie support to LWP::Simple
4. Win32-AuthenticateU~ [0.02] Win32 User authentication for domains
5. WWW-Search [2.46] Query web search engines and get URLs
6. WWW-Search-Yahoo [2.37] backend for searching www.yahoo.com
7. XML-Writer [0.531] Perl extension for writing XML documents.
ppm>;
++++++++++++++++++++++++++++++++++++++++++++
yahoo在里面呀
. |
|