# Here's how this routine is typically called: #
# ($me = $0) =~ s'.*/'' unless defined($me); #
# &Vopt($ENV{"V_$me"} || $ENV{"D_$me"} || $ENV{"T_$me"} || '1'); #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
sub Vopt {
$Vopt = shift;
print "
Vopt: Vopt=\"$Vopt\"
\n" if $D>1;
if ($Vopt =~ /^(\d+)(.+)$/) {
$V = $1;
$Vfil = $2;
if (!open(V,">>$Vfil")) {
print V "$me: Can't write \"$Vfil\" ($!)\n" if $V>0;
open(V,">>&STDERR");
}
} else {
$V = $Vopt;
open(V,">>&STDERR");
}
select V; $| = 1; select STDOUT; $| = 1;
$esep = '=' x 70;
$hsep = '-' x 70;
print V "\n$me $esep\n" if $V>1;
print V "$me started with V=$V ", `date` if $V>1;
}
1;