use LWP::UserAgent; use LWP::Simple; use HTTP::Request::Common; use HTTP::Cookies; use URI; $mainpath='d:\\'; $url='http://darknsk.com/forum/privmsg.php'; $pageref='http://darknsk.com'; $userag='hui'; $ua = LWP::UserAgent->new; $cookiepath=$mainpath."lwpcookies.txt"; $ua->cookie_jar(HTTP::Cookies->new(file => $cookiepath, autosave => 1)); $h1 = new HTTP::Headers Accept => 'application/vnd.ms-excel, application/msword, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-comet, */*', User_Agent => $userag, Referer => $pageref; $req = new HTTP::Request ('POST', $url, $h1); $req->content_type('application/x-www-form-urlencoded'); $req->content('username=DarkSilence&subject=test&addbbcode20=white&addbbcode22=10&addbbcodefontface=0&helpbox=Цвет шрифта: текст Подсказка: можно использовать color=#FF0000&message=test3&folder=inbox&mode=post&sid=5864e05f6afb7c32282202648bfd1f75&post=Отправить'); my $res = $ua->request($req); $otvet=$mainpath.'otvet.htm'; open(OTVET,">$otvet") || die "otvet file open failed: $!"; print OTVET $res->as_string; close OTVET;