in reply to undef number?

Any value in your list would do, such as the first value $number_to_compare will take.
my $max = $numbers[0]; for (@numbers) { $max = $_ if $_ > $max; }

Update: Added example.

Replies are listed 'Best First'.
Re^2: undef number?
by PeterPeiGuo (Hermit) on Apr 18, 2010 at 02:12 UTC

    That's right. The OP is not really looking for the biggest number that perl can express, but the biggest number of his own collection.

    Peter (Guo) Pei