diff --git a/teetime/teetime b/teetime/teetime index f89bcf4..c886b7e 100755 --- a/teetime/teetime +++ b/teetime/teetime @@ -111,7 +111,6 @@ sub readstdin { my $in; my $twogb = 2**31; open(my $fh, ($opt::append ? ">>" : ">"), $file) || die; - #open(my $fh, ">", $file) || die; vec($rin, fileno(STDIN), 1) = 1; while(1) { @@ -163,7 +162,7 @@ sub version() { ); } -sub usage() { +sub help() { # Returns: N/A print join ("\n", @@ -179,21 +178,6 @@ sub usage() { "",); } -sub help() { - # Returns: N/A - print join - ("\n", - "GNU $Global::progname $Global::version", - "Copyright (C) 2020 Ole Tange, http://ole.tange.dk and Free Software", - "Foundation, Inc.", - "License GPLv3+: GNU GPL version 3 or later ", - "This is free software: you are free to change and redistribute it.", - "GNU $Global::progname comes with no warranty.", - "", - "Web site: https://gitlab.com/ole.tange/tangetools/-/tree/master/${Global::progname}\n", - ); -} - $|=1; $Global::progname = "teetime"; $Global::version = "20200721"; @@ -202,6 +186,10 @@ if(GetOptions("debug|D=s" => \$opt::D, "input|i" => \$opt::input, "help|h" => \$opt::help, "version|V" => \$opt::version)) { + if($opt::help) { + help(); + exit(1); + } if($opt::input) { readfile(@ARGV); } else {