Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7977843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:19:31+00:00 2026-06-04T09:19:31+00:00

I am using WWW::Mechanize to automatically add my email address as a preferred one.

  • 0

I am using WWW::Mechanize to automatically add my email address as a preferred one. After a lot of difficulty I could log into the page, but when I try to add an email address as an allowed email address it does not work. Even the link does not show up. What am I doing wrong? The link of the Amazon page is this.

My code:

use WWW::Mechanize;
use HTTP::Cookies;
use HTML::Form;
use WWW::Mechanize::Link;

my $bot = WWW::Mechanize->new();
$bot->agent_alias( 'Linux Mozilla' );

$bot->cookie_jar( HTTP::Cookies->new(file           => "cookies.txt",
                                     autosave       => 1,
                                     ignore_discard => 1, ) );
# Connect to the login page
my $response = $bot->get( 'https://www.amazon.com/gp/css/homepage.html/' );

# Get the login form. You might need to change the number.
$bot->form_number(3);

# Enter the login credentials.
$bot->field( email => 'email' );
$bot->field( password => 'pass' );
$response = $bot->click();

#print $response->decoded_content;
$bot->get( 'https://www.amazon.com/gp/digital/fiona/manage?ie=UTF8&*Version*=1&*entries*=0#pdocSettings' );
my @links = $bot->find_all_links( tag => "a" );

foreach (@links)
{
  print $_->text()."\n" ;
}

My tamper data is this

Referer=https://www.amazon.com/gp/digital/fiona/manage?ie=UTF8&%2AVersion%2A=1&%2Aentries%2A=0

POSTDATA=sid=183-7190983-6755358&newEmail=myid%40mailhost.com

Edit: After searching I realised that WWW::Mechanize may not be able to achieve this as it lacks JavaScript support. I decided to use WWW::Scripter with the plugin. Would someone please tell me how to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:19:34+00:00Added an answer on June 4, 2026 at 9:19 am

    You found answer to your question on other post: Calling a link from perl

    For future tasks similar to this one, I suggest you to do following work-around:

    • install Google Chrome (if you don’t have it already)
    • navigate browser to form page you want to simulate
    • on submit button click right-click mouse button and select “Inspect element”
    • switch to “Network” tab
    • click to submit button on the form
    • see information in “Network” table, especially in “Headers” and “Response” sub-tabs.

    By this kind of debugging you will find exact communication between server and browser, including cookies, referers, request methods, urls, submit data, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to login automatically in a website using Perl with WWW::Mechanize . What
I'm using WWW::Mechanize to do some standard website traversal, but at one point I
I want to download images using WWW:Mechanize and to save into the file names
I'm using WWW::Mechanize::Firefox to crawl pages that load some JavaScript after they have been
I'm using WWW::Mechanize to query the Twitter API and storing the (XML) results into
I am using plugin WWW::Scripter (subclass of WWW::Mechanize ) to authenticate to my host's
I'm trying to use WWW::Mechanize to extract some links from the HTML page using
Im using mechanize to parse http://www.hammacher.com/Category/Default.aspx?uq=Gifts-Under-30&all=True What xpath can I use to get to
I want to search content from a site using WWW::Mechanize but to be able
Using the WWW::Mechanize and HTTP::Cookies how would I extract the cookie past in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.