some cleanups

This commit is contained in:
qorg11 2020-08-06 23:52:52 +02:00
parent c35ca47d5b
commit 95ab4caca1
No known key found for this signature in database
GPG key ID: 343FC20A4ACA62B9

View file

@ -74,16 +74,14 @@ my $ua = LWP::UserAgent->new;
GetOptions ("server=s" => \$DEFAULT_SERVER, GetOptions ("server=s" => \$DEFAULT_SERVER,
"help|" => \$help); "help|" => \$help);
if($help || not defined $ARGV[0]) &help if $help || not defined $ARGV[0];
{
&help;
}
# check if file is given # check if file is given
$file = $ARGV[@ARGV-1]; $file = $ARGV[@ARGV-1];
die "File does not exist\n" if !-e $file; die "File does not exist\n" unless -e $file;
my $url_to_upload = $DEFAULT_SERVER . "/upload.cgi"; my $url_to_upload = $DEFAULT_SERVER . "/upload.cgi";
my $req; my $req;