in reply to Re: Re: LWP not returning leading spaces in web page
in thread LWP not returning leading spaces in web page

I updated the regex to (I believe) properly look for individual lines with leading spaces and some text.if ($r->content =~ m/^\s+\S$/m)

Your regex doesn't do what you claim it does. This regex looks for

  1. beginning of line
  2. at least one whitespace
  3. one non whitespace character
  4. end of line
That's quite a strange line, containing only one non whitespace character ... fokat's original regex correctly looks for a line beginning with a couple of whitespaces followed by a non whitespace char.

-- Hofmator