### SUB validate_command_line_args ### DOES: perform various sanity + checks on command line argume +nts ############# sub validate_command_line_args { my ($name,$prompt,$configf,$quiet,$outf,$debug,$batchsize,$proto,$ +tacacs,$verbose,$header,$maild +st,$path) = @{ $_[0] }; ... if ( $batchsize > 30 ){ warn("$0:WARNING: More than 25 simultanous connections are NOT + allowed!\nReducing Max_Connec +tions to 25.\n"); $batchsize=25; }elsif ( $batchsize < 0 ){ warn("$0:WARNING: Negative Max_Connections are not permitted, +forking has been disabled.\n") +; $batchsize = 0; } }
The $batchsize variable is lexically scoped to this subroutine so changing its value will have no effect on anything outside this subroutine.
In reply to Re^5: RFC: beginner level script improvement
by jwkrahn
in thread RFC: beginner level script improvement
by georgecarlin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |