LWP::UserAgent & Mechanize

Discussion in 'Perl Misc' started by nyana, Aug 1, 2004.

  1. nyana

    nyana Guest

    Obviously innefficient code because I am querying server twice:

    my $ua = LWP::UserAgent->new;
    my $response =
    $ua->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");
    $mech->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");

    What can I use to store the contents of SnapShot.asp?

    I tried:
    $mech->get($response) and ...($ua).
    $mech = $response and ...($ua).

    maybe i should look at the mechanize.pm and see how it wants it ... after I
    get so some sleap.

    Thanks,
    nyana
    nyana, Aug 1, 2004
    #1
    1. Advertising

  2. nyana

    nyana Guest

    Some context:

    $mech->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");
    my $ua = LWP::UserAgent->new;
    my $response =
    $ua->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");
    my $date = HTML::Form->parse($response->content,$response->base);
    my $dvalue = $date->param('txtSSDate');

    I need to use LWP to feed into HTML::Form. I know I could do the same thing
    with HTML::Form alone, but I would still be calling the .asp twice...
    nyana, Aug 1, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. La Jesus
    Replies:
    9
    Views:
    1,313
    Gunnar Hjalmarsson
    Oct 27, 2003
  2. Chandra

    Problem with LWP::USERAGENT

    Chandra, Feb 25, 2004, in forum: Perl
    Replies:
    0
    Views:
    497
    Chandra
    Feb 25, 2004
  3. Vinay Gupta
    Replies:
    2
    Views:
    1,107
    Michael Schlenker
    Jul 27, 2004
  4. Playker
    Replies:
    0
    Views:
    508
    Playker
    Feb 24, 2005
  5. Replies:
    13
    Views:
    2,739
    Arne Vajhøj
    Mar 18, 2008
Loading...

Share This Page