in reply to HTTP problem while using LWP module
Probably not directly related to your problem... but note that the $content variable at the end of the line
my $content = get $url or die "Couldn't get $url" unless defined $cont +ent;
is not the variable you presumably think it is (i.e. the my $content from the beginning of the line). Rather, it's a global variable... (use strict; would have warned you! 'Global symbol "$content" requires explicit package name...').
Thus it'll remain undefined, even on subsequent iterations of the while loop, after my $content has been sucessfully assigned some content.
I'm not really sure what your intention is behind that unless defined $content, but expect it to not be working one way or another... (at best, it's useless :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HTTP problem while using LWP module
by Anonymous Monk on Apr 30, 2008 at 07:13 UTC |