Thread Bitte Feedback und Diskussion Net::HTTP10 (11 answers)
Opened by rosti at 2011-03-21 18:51

topeg
 2011-03-21 22:18
#146729 #146729
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
So kann man es machen.
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new();

my $service = 'http://rolfrost.de/cgi-bin/100.cgi';

my $res=$ua->get($service, ':read_size_hint' => 4, ':content_cb' => sub {
        my ($data, $response, $protocol) = @_;
        printf("%u\n",unpack('N', $data));
    });

if ($res->is_success)
{ print "OK\n"; }
else
{ print "ERROR\n"; }

View full thread Bitte Feedback und Diskussion Net::HTTP10