Hello Perl Monks
okay so i have this problem with using the LWP library.
I have jsut sttarted learning how to use it so im using this very simple program that gets the page of the given url
#!usr/bin/perl
use LWP::Simple;
getprint($ARGV[0]);
exit;
when i run this program it seems to get stuck in an infinite loop. when i ran it using the debugger this was the final error that i got when i just skipped running throught the modules
IO::Socket::connect(/usr/lib/perl5/5.8.0/i386-linux-thread-multi/IO/So
+cket.pm:121):
121: $err = $! || (exists &Errno::ETIMEDOUT ? &Errn
+o::ETIMEDOUT : 1);
so i ran thro the debugger line by line and as suspected it gets stuck in an infinite loop. the following are the lines of code that kept repeating as given by the debugger
im sorry if im being a little too descriptive. just that i really didnt understand whats going on so i jus copied the lines from the terminal
HTTP::Headers::CODE(0x82e8db0)(/usr/lib/perl5/site_perl/5.8.0/HTTP/Hea
+ders.pm:59):
59: for (@header_order) {
DB<8>
HTTP::Headers::CODE(0x82e8db0)(/usr/lib/perl5/site_perl/5.8.0/HTTP/Hea
+ders.pm:60):
60: my $lc = lc $_;
DB<8> s
HTTP::Headers::CODE(0x82e8db0)(/usr/lib/perl5/site_perl/5.8.0/HTTP/Hea
+ders.pm:61):
61: $header_order{$lc} = ++$i;
DB<8> s
HTTP::Headers::CODE(0x82e8db0)(/usr/lib/perl5/site_perl/5.8.0/HTTP/Hea
+ders.pm:62):
62: $standard_case{$lc} = $_;
DB<8> s
these are the four lines that keep repeating in the debugger. im not able to go beyond this
can anyone tell me what is going on andhow i solve this problem?? plz help!!. will be really grateful!!
Arvind
Edit: g0n code tags round output data
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.