in reply to getting HTML source
Have you tried installing LWP to a local directory and using use libs './path/to/local/modules/'? This way your code can still get at the module and you do not affect the site install of perl. I can't think of a way to solve this that isn't a coding nightmare or dependent on systems calls that function. I like turnstep's suggestion re: absolute paths.
note: this post has been modified.