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 |