>>>>> "Timothy" == Timothy Kimball <[EMAIL PROTECTED]> writes:

Timothy> Randal L. Schwartz wrote
Timothy> : For integers, you can narrow it down:
Timothy> : 
Timothy> :     sub is_integer {
Timothy> :       my $bad = 0;
Timothy> :       local $SIG{__WARN__} = sub { $bad++ };
Timothy> :       local $^W = 1;
Timothy> :       my $guess = shift;
Timothy> :       return $guess == int($guess) and not $bad;
Timothy> :     }

Timothy> oops, precedence:

Timothy> return $guess == int($guess) && not $bad;

Timothy> Otherwise everything's an integer.

Ooops. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to