背景:公司需要开发一套大型客服系统 需求为100个客服同时回复N个用户的邮件,所以找个perl来自动读取一个特定邮箱的邮件比如service@java-er.com #!/usr/bin/perl -w use strict; use Mail::POP3Client; my $pop; my $num_mesg; my $i; my $username; our $mail_host = 'imap.exmail.qq.com'; our $mail_user = 'yuexiaosheng@java- More
use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("$0/0.1 " . $ua->agent); # $ua->agent("Mozilla/8.0") # pretend we are very capable browser $req = HTTP::Request->new( GET => 'http://www.baidu.com'); $req->header('Accept' => 'text/html'); # send request $res = $ua->request($req); print $res-> More