sam313 has asked for the wisdom of the Perl Monks concerning the following question:
I tried to identify the strange character with the following debug code:$h = new HTTP::Headers Content_Base => '$url'; $h->authorization_basic($uname, $password); $request = HTTP::Request->new( 'GET', $url, $h ) ; $ua = LWP::UserAgent->new; $count = 0; $response = $ua->request($request); while (!$response->is_success) { writelog("Failed to GET '$url': ".$response->status_line); sleep(30); $count++; $count < 20 or die "Failed to GET '$url': ", $response->status_line; $response = $ua->request($request); } open (FH, '>orders.csv'); print FH $response->decoded_content; close FH;
The output from the above debug code was:open(FH,'orders.csv') or die "$!"; while($line = <FH>) { $character = chop($line); print "!!!! $character ****\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strange character with HTTP::Request GET
by GrandFather (Saint) on May 01, 2008 at 04:45 UTC | |
by sam313 (Initiate) on May 01, 2008 at 04:59 UTC | |
by ikegami (Patriarch) on May 01, 2008 at 05:39 UTC | |
by sam313 (Initiate) on May 01, 2008 at 04:55 UTC | |
|
Re: strange character with HTTP::Request GET
by ikegami (Patriarch) on May 01, 2008 at 04:27 UTC | |
by sam313 (Initiate) on May 01, 2008 at 04:53 UTC | |
by ikegami (Patriarch) on May 01, 2008 at 05:34 UTC | |
|
Re: strange character with HTTP::Request GET
by Anonymous Monk on May 01, 2008 at 19:49 UTC |