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 4340888
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:24:37+00:00 2026-05-21T11:24:37+00:00

I am having some difficulties getting results from a form via Perl. I believe

  • 0

I am having some difficulties getting results from a form via Perl. I believe I have successfully found the form and submitted the value I want to the appropriate field, but am unsure of how to turn the response object into something useful (If I print it out it shows up as the following).


HTTP::Request=HASH(0x895b8ac)

Here is the relevant code (assume $url is correct)


    my $ua = LWP::UserAgent->new;
    my $responce = $ua->get($url);
    my @form = HTML::Form->parse($responce);
    my $chosen = $form[0];
    $chosen->value('netid', $user);
    my $ro = $chosen->click('Search');

What can I do to make $ro useful?

Thanks!

  • 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-05-21T11:24:37+00:00Added an answer on May 21, 2026 at 11:24 am

    To quote the HTML::Form docs on click:

    The result of clicking is an HTTP::Request object that can then be passed to LWP::UserAgent if you want to obtain the server response.

    So you can do:

    my $ua = LWP::UserAgent->new;
    my $response = $ua->get($url);
    my @form = HTML::Form->parse($response);
    my $chosen = $form[0];
    $chosen->value('netid', $user);
    my $ro = $chosen->click('Search');
    
    # If you want to see what you're sending to the server:
    print $ro->as_string;
    
    # Fetch the server's response:
    $response = $ua->request($ro);
    

    What you do with $response next depends on what you’re trying to do.

    P.S. “responce” is usually spelled without a C. But HTTP does have a history of misspellings. (I’m looking at you, “Referer”.)

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

Sidebar

Related Questions

I'm having some difficulties with uploading an image from an html form. The form
I'm having some difficulties with getting the value of a subclass in a element.
I'm having some difficulties creating a sum from values I have in a collection.
I'm having some difficulties getting the TabActivity to work. Here's the implementation of the
I'm having some difficulties with Ajax.BeginForm I have something like this in a view
I'm having some difficulties with a query: SELECT d.*, (SELECT COUNT(id) FROM downloads WHERE
I'm having some difficulties with passing functions around. I have this code: var options
I’m having some difficulties while trying to consume an unmanaged-code dll from my application
I'm having some difficulties to sort my results by Date. Is there any special
I was having some difficulties with some text I was receiving from a Web

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.