On Wednesday 12 April 2006 12:20, [EMAIL PROTECTED] wrote:
[ . . ]

lynx -source http://www.theblackchurchpage.com/modules.php?name=Locator > 
tsthtmsource.htm

That gets it the page's markup/source on my Slackware.

There's javascript in that page but I don't know much about this.

It appears you are missing submit_form

$mech->submit_form(
        form_name => 'form_a2z',
        fields    => { query  => 'stuff', },
        button    => 'Search Now'
    );

I've a couple of mis matched libraries on my Slackware's Perl installation 
(may b why next wouldn't work for me?)

But I thought the next would have printed to STDOUT for me; instead, printed 
nothing except a blank line -- (appeared to go out as my network showed brief 
activity though I didn't ethereal to verify).

#!/usr/bin/perl -w
use strict;

use WWW::Mechanize;

# my $output_dir = "c:/training/bc/";

my $starting_url = 
'http://www.theblackchurchpage.com/modules.php?name=Locator';

my $m = WWW::Mechanize->new();
# $m->agent_alias( 'Windows IE 6' );
$m->get( $starting_url );
# print "Content-type: text/plain\n\n";
print $m->content;

__END__


#$browser->form_number( 3 );
my $name = 'form1';
$browser->form_name( $name );

$browser->field( "church_state", "OH" );
$browser->submit();
{
open OUT, ">bc7.xls" or die "Can't open file: $!";
print OUT $browser->content;
# close OUT;
}
#close PAGE;
print $browser->content;

-- 
Alan.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to