Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

davidrw's scratchpad

by davidrw (Prior)
on Feb 02, 2005 at 03:25 UTC ( #427129=scratchpad: print w/replies, xml ) Need Help??

use strict; use warnings; use WWW::Mechanize; use MIME::Base64; my $PW = 'PWPWPW'; my $auth = MIME::Base64::encode("" . ':' . $PW); my $mech = WWW::Mechanize->new(); #$mech->default_headers->authorization_basic("", $pw); $mech->add_header( 'Authorization' => 'Basic ' . $auth ); $mech->get(''); print $mech->content; __END__ my $mech = WWW::Mechanize->new(); my @args = (Authorization => "Basic " . MIME::Base64::encode("" . ':' . $PW)); $mech->credentials('', 'ABCDEF', "", $PW); $mech->get('', @args); print $mech->content; warn MIME::Base64::encode("" . ':' . $PW) . "-"; __END__ my $mech = WWW::Mechanize->new(); #$mech->default_headers->authorization_basic("", $pw); #$mech->add_header( 'Authorization' => 'Basic OmVsbHkwMA==' ); #$mech->get(''); $mech->get(''); print $mech->content;
Log In?

What's my password?
Create A New User
[thepkd]: Hey 1nickt sorry man. What
[GotToBTru]: a ref too far ;)
[thepkd]: Yes this is my first time in cb. Trying to work my way around.
[JohnCub]: "A ref too far" would make a good title for anyone's perl memoirs
[thepkd]: Anyways it works with $aohoaoh[0]->{'foo '}[0]->{'bar'}
[GotToBTru]: "I did it my $way"
[JohnCub]: I hope $way isn't a hashref. ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2016-12-06 13:47 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (105 votes). Check out past polls.