you can also do $self->_set_Max_Questions(...) to make your code look more object oriented :) Update err, the $self-> thing is assuming you are using OO, based on the $self...if($Max_Questions > $Total_Questions){ croak"Number of questions in $FileName exceeded"; }elsif($Max_Questions < 1){ croak"Must have at least one question in the test."; }else{ &_set_Max_Questions($self,(defined $Max_Questions ? $Max_Questions : + $Total_Questions)); }
Update This is just plain wrong, see post below.
- Ant
- Some of my
best work - (1 2 3)
In reply to Re: Optimization of a piece of code(Is there a better way than this?)
by suaveant
in thread Optimization of a piece of code(Is there a better way than this?)
by TStanley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |