Harish Garg
Harish Garg

Reputation: 55

How can I make HTTP calls from Perl?

I want to write a Perl script which calls a URL with certain parameters.

Upvotes: 2

Views: 212

Answers (3)

Andy Lester
Andy Lester

Reputation: 93676

You can use LWP::UserAgent, or you can use LWP::Simple if you don't need an object. If you are going to be using the results of the web page to crawl to other pages, such as to extract URLs or get URLs of images, you'll want to use WWW::Mechanize, which is a wrapper around LWP::UserAgent that handles all the HTML parsing for you.

Upvotes: 13

Alex Howansky
Alex Howansky

Reputation: 53563

use LWP::Simple;
my $result = get($url);

Upvotes: 8

Eugene Yarmash
Eugene Yarmash

Reputation: 149806

Have a look at the LWP::UserAgent module on CPAN.

Upvotes: 6

Related Questions