What is the easiest way to download the contents of a URL with Perl?

Q

What is the easiest way to download the contents of a URL with Perl?

✍: Guest

A

Once you have the libwww-perl library, LWP.pm installed, the code is this:
#!/usr/bin/perl
use LWP::Simple;
$url = get 'http://www.websitename.com/';

2013-09-18, 2119👍, 0💬