in reply to Re^2: Integer detection conceptin thread Integer detection concept
sub is_int { my $warned = 0; local $SIG{__WARN__} = sub { $warned++ }; local $^W = 1; $_[0] == int $_[0] and not $warned; } [download]
-- Randal L. Schwartz, Perl hacker