in reply to [SOLVED]Unable to split $ARGV variable. Can it be done?
.pm is usually for modules which don't usually take arguments in the way you seem to want. So, I'd recommend changing the name to getrequest.pl, or something more descriptive as it sounds like it's doing a lot. I would highly recommend URI as mentioned by
my $url = URI->new( $ARGV || die "Give a URI\n" );
$url->scheme =~ /https?/
or die "This is not a URL we can use...\n";
print $url, $/,
perl ~/getrequest.pl http://nasa.org/moon