diff --git a/bin/mail b/bin/mail index 8c035c1e..95a86ad7 100755 --- a/bin/mail +++ b/bin/mail @@ -633,15 +633,18 @@ EDLOOP: { 1; package main; -use English; +use File::Basename qw(basename); use File::Temp; use Getopt::Std; + use vars qw($opt_f $opt_s $opt_c $opt_b $opt_v); our $VERSION = '0.04'; our $ROWS = 23; # Screen Dimensions. Yeah, this sucks. our $COLS = 80; our $BUFFERL = 2; # Lines needed for "fluff" + +my $Program = basename($0); my $box; my %commands=( @@ -975,7 +978,6 @@ sub Interactive { my $current=1; select STDOUT; $|=1; - print "Mail [$VERSION Perl] [$OSNAME]\n"; # This is fluff. my $cmd = "Init"; CMDS: { @@ -1037,9 +1039,14 @@ sub Batch { $mailer->send($message); } +sub VERSION_MESSAGE { + print "$Program version $VERSION\n"; + exit; +} + getopts("f:s:c:b:v") || die <