everlast88az:

Debugging 101: With the error message given, I'd first suspect that you're calling Win32::IE::Mechanize incorrectly. Since you call it three times, you should determine which call is failing and/or check the related values

perl has a nice debugging mode built into it, which you could use to set a breakpoint at line 967. Then when the program fails, you can look at the values, and examine the call stack to see where they're coming from, and why.

However, many people don't use the debugger. Instead they would print trace messages in various locations, combined with dumping the actual values involved. Something like:

#!/usr/bin/perl -w sub trace { print join(' ', map { defined($_) ? $_ : '#undef#' } @_), +"\n"; } my $val; trace('Before first chunk, value is', $val); $val='foobar'; trace('Before second chunk, value is', $val); $val=7.3; trace('Final value is', $val);

Running that would show:

roboticus@swill $ ./foo.pl Before first chunk, value is #undef# Before second chunk, value is foobar Final value is 7.3

You can see that on the first chunk, $val is undefined.

So, you might verify that $ie actually contains a legitimate value. If it is, then you could check whether $url is defined.

...roboticus

In reply to Re: Win32::IE::Mechanize Issues by roboticus
in thread Win32::IE::Mechanize Issues by everlast88az

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.