Perl Programming Question:
Download Questions PDF

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

Answer:

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/';

Download Perl Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do I replace every <TAB> character in a file with a comma?How to concatenate strings with Perl?