in reply to max of N numbers?

There is no way to find the max of N numbers without using comparison operators. However, you can just add a short function to your code for finding max:
use strict; use warnings; my @arr = (2,7,12,5,17,9); print max(@arr); sub max { my $max = $_[0]; do { $max = $_[$_] if $max < $_[$_]; } for 1..$#_; $max; }
This takes linear time. Or you can use a sort, which takes O(n lg n) time:

my $max = (sort { $b <=> $a } @arr)[0];