##
my $Usage = "$0 http://target.url\n";
die $Usage unless ( @ARGV == 1 and $ARGV[0] =~ m{^http://} );
$target = shift;
...
####
die $Usage unless (@ARGV == 1 and $ARGV[0] =~ m{^((?:http|ftp)://)?(\w*.*)}i and $2);
$target = ( $1 ) ? shift : ( substr($2,0,3) eq "ftp" ? "ftp://$2" : "http://$2";
...