All,
I didn't see an LWP specific list, so I hope someone here knows about this.
I'm using LWP agent to submit an HTTP::Request for a url that is returning
text/htmlcharset=UTF-8 content type. However it's supposed to be tab
delimited data but by the time $response->content gets it the tabs are gone
and it seems to have been space expanded!
I can see the data from the website through a regular browser and it looks
like the data is tab delimited in the source view on mozilla (ie the second
column is all lined up) but when I analyze within perl the data I'm getting
multiple 0x20 bytes instead of a single 0x09.
Is it possible the source is wrong? Unfortunately I don't have control over
the source, and I can't post the link to the data (as it requires a
user/password to access). The code I use is in essence:
my $browser = LWP::UserAgent->new;
my $response = $browser->get( $URL );
my $foo = pack("C",9);
if ( $response->content =~ /$foo/)
{
print "found tab!";
} else
{
print "no tabs!";
}
And I get no tabs. Can anyone think of a way to verify the source data is
correct, and/or know if there is a LWP or HTML header I should be setting to
prevent tab expansion to spaces (if that's what's happening).
-Wayne Simmons
--
Software Engineer
InterSystems USA, Inc.
303-858-1000
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs