Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

WWW::Mechanize Basics

by PerlSufi (Friar)
on Jun 06, 2013 at 19:49 UTC ( #1037506=perltutorial: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use WWW::Mechanize; my $mech = WWW::Mechanize->new(); 
    my $url = "https://homepage.com"; 
    ...
    $mech->follow_link( url => 'https://account.login.page.com'); 
    if ($mech->success()){ print "Successful Connection\n"; } 
    else { print "Not a successful connection\n"; }
    
  2. or download this
    print $mech->content;
    
  3. or download this
    $mech->dump_text;
    
  4. or download this
    #This block of code is intended to fill in the required forms $mech->g
    +et("https://account.login.page.asp"); 
    my $usr = "username"; 
    ...
    $mech->form_number(4); 
    $mech->field( "enddate", $end_date); 
    $mech->click();
    
  5. or download this
    use WWW::Mechanize; 
    use IO::Socket::SSL qw(); 
    
    my $mech = WWW::Mechanize->new(ssl_opts => { SSL_verify_mode => IO::So
    +cket::SSL::SSL_VERIFY_NONE, verify_hostname => 0,});
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://1037506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-07-05 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls