Leser: 5
3 Einträge, 1 Seite |
Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/usr/bin/perl -w use strict; use warnings; use diagnostics; use WWW::Mechanize; use Time::Local; use POSIX qw(strftime); my $http = WWW::Mechanize->new(); $http->get('http://www.eineurl.de'); my $submit = $http->submit_form( form_number => 1, fields => { login => 'login', password=> 'passwort', }, button => 'submit'); print "Anmeldung fehlgeschlagen!\n" and exit 0 if(!$http->success());
1 2 3 4 5 6 7
my $submit = $http->submit_form( 15: form_number => 1, 16: fields => { 17: login => utf8::decode('login'), 18: password=> utf8::decode('passwort'), 19: }, 20: button => 'submit');
3 Einträge, 1 Seite |