Let’s pretend I’m going to share some code.
sub set_up_options
{
my $comargs = shift @_;
if ( $comargs->{th_lo} ) {
$comargs->{threshmap}[0] = $comargs->{th_lo};
}
if ( $comargs->{th_hi} ) {
$comargs->{threshmap}[1] = $comargs->{th_hi};
}
if ( $comargs->{do_nr} || $comargs->{do_n2} ) {
$comargs->{threshmap}[0] = ( $comargs->{do_n2} ) ? -1.0 : 0.0;
$comargs->{threshmap}[1] = 1.0;
}
# If we have a range, append 'not' flag
if (scalar @{ $comargs->{sub_cols} } ) {
push( @{ $comargs->{sub_cols} }, $comargs->{do_not});
}
return '';
}