[EMAIL PROTECTED] writes: > Until recently, I've not even noticed that data I get back from > libwww/UserAgent/simple_request has all beginning whitespace stripped from lines. > At first I thought it was the default behavior when getting content returned > when using the LWP::UserAgent/simple_request classes. > > But I stepped into a simple_request call far enough to see that the data returned > from sysread() also has whitespace removed at the beginnings of lines. This is > different from the the webpage, which has indented HTML code. The only reason I > care is I'm trying to extract text within <pre> blocks without losing whitespace. > > Any suggestions on how to preserve the HTML data? If it weren't for requiring > cookies, > a log in, and complicated redirects I'd search out another solution. I'm surprised > at the sysread() return value and would think that's as raw as the data can get.
It is. Sysread is definitively not changing the data. The server must send stripped data for some reason. Most likely it serves different documents based on User-Agent header send from the client side.
