Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: WWW:::Mechanize and credentials

by Limbic~Region (Chancellor)
on Mar 09, 2005 at 15:52 UTC ( #437937=note: print w/replies, xml ) Need Help??

in reply to WWW:::Mechanize and credentials

While the other answers in this thread are good, sometimes it helps to have example code:
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $url= ''; my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->credentials( '', 'ABCDEF', 'admin' => 'password' ); $mech->get( $url ); print $mech->content();

Cheers - L~R

Replies are listed 'Best First'.
Re^2: WWW:::Mechanize and credentials
by petdance (Parson) on Mar 10, 2005 at 17:42 UTC
    Nice. I've added this to the Mech Cookbook.