Does this answer your question ?

#!/usr/bin/perl -- use WWW::Mechanize; use Data::Dumper; use strict; use warnings; my $res = $mech->get('http://example.com'); print int $res == $mech->res print int $res->status == $mech->res->status print int $res->status == $mech->status my $res2 = $mech->get('http://example.com/two'); print int $res == $mech->res print int $res->status == $mech->res->status print int $res->status == $mech->status print Dumper( { mech => $mech, rest => $res , rest2 => $res } ); __END__ #!/usr/bin/perl -- use WWW::Mechanize; use Data::Dumper; use strict; use warnings; my $mech = WWW::Mechanize->new; my $res = $mech->get('http://example.com'); print int $res == $mech->res; ## HELLO print int $res->code == $mech->res->code; print int $res->code == $mech->status ; my $res2 = $mech->get('http://example.com/two'); print int $res2 == $mech->res; ## HELLO print int $res2->code == $mech->res->code ; print int $res2->code == $mech->status; print "\n"; print Dumper( { mech => $mech }, { res1 => $res , res2 => $res } ); __END__ 111111 $VAR1 = { 'mech' => bless( { ... $VAR2 = { 'res1' => $VAR1->{'mech'}{'page_stack'}[0]{'res'}, 'res2' => $VAR1->{'mech'}{'page_stack'}[0]{'res'} };

Like a regular browser, a stack of pages is kept, a history, so you can go forward or back

Also Basic debugging checklist item 4 ( Dumper )


In reply to Re: Working with Mechinaze and Responses by Anonymous Monk
in thread Working with Mechinaze and Responses by ShipMyPants

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.