David Sanders wrote:
>
> I am having a problem with LWP::Simple::get() on a Windows XP installation.
> (LWP version 5.69).
> The following command hangs up (requiring a Cntrl-c):
> perl -e "use LWP::Simple; my \$out=get(\"http://www.cpan.org\");print \$out"
>
> but this works
> perl -e "use LWP::Simple;getprint(\"http://www.cpan.org\")"
>
> both command work fine on my Linux machine.
Hi David.
The code string you're specifying is a command-prompt string, not a Perl
one, so the dollars don't need escaping. It's also easier to use single
quotes within the code if you can, or qq() if you need interpolation.
Try these:
perl -e "use LWP::Simple;getprint('http://www.cpan.org')"
perl -e "use LWP::Simple; my $out=get(qq(http://www.cpan.org)); print $out"
HTH,
Rob