- http
- web
- GET
- LWP::Simple
Fetch web page
examples/applications/get_webpage.pl
#!/usr/bin/env perl use strict; use warnings; use LWP::Simple qw(get); my $page = get "http://perlmaven.com/"; if ($page) { print "Site is alive\n"; } else { print "Site is not accessible\n"; }