in reply to LWP not returning leading spaces in web page
Since you did not post any code on your question, I have to assume your code has some problem. I did the following:
#!/usr/bin/perl; use LWP; use strict; use warnings; my $ua = new LWP::UserAgent; my $r = $ua->get("http://www.perlmonks.org/index.pl?node_id=231795"); if ($r->is_success) { if ($r->content =~ m/^\s+\S/m) { print "I saw some trailing spaces...\n"; } else { print "Oppsie! I did not see any trailing spaces...\n"; } } else { die "Failed miserably\n"; }
... and guess what:
bash-2.05a$ perl lwp I saw some trailing spaces... bash-2.05a$ perl -MLWP -e 'print $LWP::VERSION, "\n";' 5.65 bash-2.05a$
As you see, in my machine / perl / LWP I obtain trailing spaces alright. So please go ahead and post your code so that we can take a deeper look at what's wrong.
Best regards
-lem, but some call me fokat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: LWP not returning leading spaces in web page
by aspen (Sexton) on Feb 01, 2003 at 08:41 UTC | |
by Hofmator (Curate) on Feb 01, 2003 at 10:17 UTC |