when i use the following code to get a page which using post
method...however, when i parse the page with
while($page =~ /^.*/mg)
{ if ($& =~ regular expresson) { };
if ($& =~ another regular expresson) { };
...}
it seems that it cannot check $page by line by line....how can I solve it?
thx~
use LWP;
use URI::Escape;
use HTTP::Request::Common;
use constant RFC_SEARCH => ' http://www.*-*-*.com/ ';
use constant RFC_REFERER => ' http://www.*-*-*.com/ ';
$ua = LWP::UserAgent->new;
$newagent = 'search_rfc/1.0 (' . $ua->agent . ')';
$ua->agent($newagent);
$request = POST (RFC_SEARCH,
Content => [ keyword => $Search],
);
$response = $ua->request($request);
die $response->message unless $response->is_success;
$page = $response->content;
..........