##
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use Data::Dumper;
my $ua = LWP::UserAgent->new();
my $url = 'http://lobitos.net/cgi-sys/cgiwrap/jlundell/stv-count.py';
my $ballot_file = '/home/hesco/foo/bar/ballot_file.txt';
my $request = (
# POST => $url,
action => 'Count',
name => 'datafile',
Content_Type => 'multipart/form-data',
Content => [ 'file' => [ $ballot_file ]] );
my $response = $ua->post($url,$request);
print Dumper($response);
1;
##
##
##
##
hesco@marcus8:~$ perl GP/GPotUS/2009/ETC/lib/upload_test.pl
Useless use of a constant in void context at lib/upload_test.pl line 15.
Useless use of a constant in void context at lib/upload_test.pl line 15.
Useless use of a constant in void context at lib/upload_test.pl line 15.
Useless use of a constant in void context at lib/upload_test.pl line 15.
Useless use of a constant in void context at lib/upload_test.pl line 15.
Useless use of a constant in void context at lib/upload_test.pl line 15.
Useless use of a constant in void context at lib/upload_test.pl line 15.
$VAR1 = bless( {
'_protocol' => 'HTTP/1.1',
'_content' => 'no field \'datafile\'',
'_rc' => '200',
'_headers' => bless( {
'client-date' => 'Thu, 17 Sep 2009 06:24:54 GMT',
'content-type' => 'text/plain',
'connection' => 'close',
'client-response-num' => 1,
'date' => 'Thu, 17 Sep 2009 06:25:35 GMT',
'client-transfer-encoding' => [
'chunked'
],
'client-peer' => '216.92.168.130:80',
'server' => 'Apache/2.2.13'
}, 'HTTP::Headers' ),
'_msg' => 'OK',
'_request' => bless( {
'_content' => 'file=%2Fhome%2Fhesco%2Ffoo%2Fbar%2Fballot_file.txt',
'_uri' => bless( do{\(my $o = 'http://lobitos.net/cgi-sys/cgiwrap/jlundell/stv-count.py')}, 'URI::http' ),
'_headers' => bless( {
'user-agent' => 'libwww-perl/5.830',
'content-type' => 'application/x-www-form-urlencoded',
'content-length' => 50
}, 'HTTP::Headers' ),
'_method' => 'POST',
'_uri_canonical' => $VAR1->{'_request'}{'_uri'}
}, 'HTTP::Request' )
}, 'HTTP::Response' );
hesco@marcus8:~$
##
##
title=Elect Your Favoprite Ice Cream
seats=4
threshold=droop
threshold=strict
verbose=3
random=37863
candidate=1 Rocky Road
candidate=2 Chocolate
candidate=3 Strawberry Sherbert
candidate=4 Cinnamon Swirl
candidate=6 Peanut Butter Fudge
candidate=8 Pralines and Cream
candidate=9 Cookies and Cream
candidate=10 Pecan Sandies
candidate=12 Vanilla ala Mode
candidate=13 Strawberry Shortcake
candidate=14 Popsickles
candidate=15 Vanilla
candidate=17 Moose Tracks
candidate=20 Ice Cream Sandwiches
candidate=21 Fudgecycles
candidate=22 Frozen Puppies
candidate=23 Homemade
candidate=24 Truffles
candidate=11 None of the above
ballots=113
4 3 1 2 6
6 1 4 2 3
1 6 8 4
1 4 3 2
1 4 2 3
6 1 2 3 4 8 9 17
6 1 3 4 2 8
4 3 1 6
8 1 4 2 3 6
3 4 1
1 6 3 4 2 8
4 3 1 2
3 1 2 4 6
1 3 4 2 6
6 1 2 8 3 23
4 1 3 2 6 8
4 3 1
1 6 3 4 2
8 6 20 14
2 1 4 3
4 1 3 2
2 4 1 3
6 1 4 3
6 3 1 4 2 8
1 4 2 6 3 8
6 8 2 1
1 4 2 3
6 1 3 4 2
1 4 3 6
10 1 3 4
3 4 2 1 8 6
1 4 3 2
1 8 2 3
4 1 3 2
1 2 4 3 6
4 6 1 3 2 8
12 10 1 3 2 4 8
6 8 1 2 4 3
1 6 2 4 3 8
1 2
3 1 4 6 2
4 3 1 2 6
4 1 3 6 2
8 6 21 22
3 4 1 2
4 1
6 1 4 3 2 8
6 3 8 2 1
6 4 1
1 2 4 3 6
3 1 4 6 2
4 3 1 6 2 8
1 2 3 4
6 2 3 1
1 4 2 6
8 1 6
1 4
13 1 2 3
4 1 3 6 2
1 2 6 4 3 8
6 3 2 8 4 1
6 1 4 3 2
1 3 2 6 4
1 8 3 2
4 3 1 6 2
4 1 2 3 6 12 10
4 3 1 6
1 6 2 4
1 6 2 3 4 8
4 1 3 6 2
1 4 3 2
6 1 4 3 2 8
1
6 1 3 4 2
3 1 4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