"be consistent" | |
PerlMonks |
limitsby harry34 (Sexton) |
on Nov 28, 2002 at 10:37 UTC ( [id://216275]=perlquestion: print w/replies, xml ) | Need Help?? |
harry34 has asked for the wisdom of the Perl Monks concerning the following question:
If I have an @array containing two columns of numbers. I can use: if (($column_1[$i] gt 10 && lt 50) and ($column_2[$i] gt 100 && lt 200)){ $number[$i] = "$column_1[$i] $column_2[$i].....good numbers\n"; foreach $_(@number) { print TEXT "$_"; } How would I code to say numbers just outside the specified range (e.g. numbers around 8-10 and 50-52 for column_1 and 98-100 and 200-202 for column_2) are possibly OK and everything else above and below that range is crap. Is there an alternative to using lt and gt ? cheers for your wisdom. harry34
Back to
Seekers of Perl Wisdom
|
|