my @urls = qw(http://www.baidu.com http://www.sina.com.cn); web_get(@urls, sub { #web_get($url, sub { my ($content, $code, $res_headers) = @_; # $res_headers 是 SHashtable 类型 say "HTTP: " . $code; say "Body: " . $content->text; $res_headers->each( sub { my ($header_k, $header_v) = @_; say "$header_k: $header_v"; } ); });
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '是'. Assuming CP1252
To install NG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NG
CPAN shell
perl -MCPAN -e shell install NG
For more information on module installation, please visit the detailed CPAN module installation guide.