[26775] in Perl-Users-Digest
Perl-Users Digest, Issue: 8842 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 9 11:05:23 2006
Date: Mon, 9 Jan 2006 08:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 9 Jan 2006 Volume: 10 Number: 8842
Today's topics:
Re: form fields <nospam@home.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 09 Jan 2006 14:24:35 GMT
From: "Nospam" <nospam@home.com>
Subject: Re: form fields
Message-Id: <Dmuwf.64945$Cj5.24391@newsfe6-win.ntli.net>
"Brian Wakem" <no@email.com> wrote in message
news:42d4asF1i7t81U1@individual.net...
> Nospam wrote:
>
> > As requested
> >
> > #!perl\bin\perl
> > use strict;
> > use warnings;
> > use WWW::Mechanize;
> >
> >
> > my $mech = WWW::Mechanize->new();
> >
> >
> >
> >
> >
> >
> >
> > my $url ='http://www.warservers.com/f/posting~mode~newtopic~f~3.htm';
> >
> >
> > $mech->get( $url );
> >
> >
> >
> > $mech->submit_form(
> > form_name => 'post',
> >
> > fields => { username => 'guesth', },
> >
> > fields => { subject => 'testing', },
> >
> > fields => { message => 'Testing...', },
> >
> >
> >
> >
> >
> >
> > $mech->click()
> >
> >
> >
> > );
> >
>
>
> What's with all the white space and top posting?
>
> Odd number of elements in hash assignment
> at /usr/lib/perl5/site_perl/5.8.6/WWW/Mechanize.pm line 1452.
> Unknown submit_form parameter "HTTP::Response=HASH(0x84a0c64)" at
> scripts/tmp/tmp70.pl line 22
>
> The $mech->click() should not be there.
>
>
> Try something like this:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use WWW::Mechanize;
>
> my $url ='http://www.warservers.com/f/posting~mode~newtopic~f~3.htm';
> my $mech = WWW::Mechanize->new();
>
> $mech->get( $url );
> $mech->form(1);
> $mech->field('username','guesth');
> $mech->field('subject','testing');
> $mech->field('message','Testing...');
> $mech->click();
>
Sorry for the top posting, however the prog compiles but nothing is posted
to the forum.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8842
***************************************