What have you tried already?
While Perl is a programming language with many special features, it still has the feature set that you can expect from other programming languages. Even if you don't know how to express this in Perl syntax, you should still be able to come up with a set of instructions that does what you want.
For example, the following set of instructions does what you want and should be easily implemented in Perl:
It's easy to convince yourself that this will always produce a solution.
In reply to Re: Coping with decimals
by Corion
in thread Coping with decimals
by Ruanae
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |