Always use strictures (use strict; use warnings; - see The strictures, according to Seuss).
Don't mix subs and main line code. Perl lets you, but it makes it vary hard to see the flow of the main line code.
Where does @results get set? Nothing in the main line code indicates that. Setting global variables as a side effect of calling code is bad!
Will all elements of @results be numeric? If not then your lack of strictures has set you up for nasty results. The spaceship operator <=> numifies its augments and most strings become 0. If you want a string compare use cmp.
In reply to Re: Script Critique
by GrandFather
in thread Script Critique
by drodinthe559
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |