#!/usr/bin/perl use strict; use warnings; use LWP::Simple qw(!head); use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); head(); print header, start_html("test"); my $url = 'http://www.perlmonks.net'; my $geturl = url_param('geturl'); my $commentid; if ( defined( $_ = $geturl ) ) { &get_url; } else { &get_site; &print_form; } sub get_url { print qq(
); print qq(URL: ); print qq(
); } sub print_form { print "test 1"; } sub get_site { my $content = get($geturl); print "test\n"; }