You're viewing old version number 2. - Current version Logging into Junco app with LWP #perl #programming sub test_log_into_account { my $email = shift; my $password = shift; my $function = "login"; my $domain = Config::get_value_for("email_host"); my $prog = Config::get_value_for("cgi_app"); my $url = "http://$domain" . "$prog/$function"; my $browser = LWP::UserAgent->new; my $response = $browser->post( $url, [ 'password' => $password, 'email' => $email ], ); my $cookie_jar = HTTP # print Dumper $response; # print Dumper $response->header('set-cookie'); my @cookies= $response->header('set-cookie'); foreach my $c (@cookies) { my @a = split(/;/, $c); my @b = split(/=/, $a[0]); print "name=$b[0]\n"; print "value=$b[1]\n\n"; } } From JR's : articles 85 words - 804 chars created on Oct 15, 2013 at 12:45:48 pm updated on Oct 15, 2013 at 03:25:31 pm - # source - versions