in reply to Equality checking for strings AND numbers
use strict; use warnings; use Scalar::Util qw(looks_like_number); my $c="11111111111111111e11111111111111111"; my $d="22222222222222222e22222222222222222"; if (looks_like_number($c) and looks_like_number($d) and $c == $d) { print "$c = $d\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Equality checking for strings AND numbers
by Anonymous Monk on Jul 13, 2007 at 14:33 UTC |