æ¨æ¥ã®looks_like_number()ã®è¿ãå¤ãããããããªãã£ãã®ã§ãcpanããinstallããã¨ãã®testãè½ã¨ãã¦è¦ã¦ã¿ãã $ cpan cpan[1]> get Scalar::Util $ cd ~/.cpan/build/Scalar-List-Utils-1.23-npHgm2/t/ $ grep looks_like_number ./* ./lln.t:use Scalar::Util qw(looks_like_number); ./lln.t: ok(looks_like_number($num), "'$num'"); ./lln.t:is(!!looks_like_number("Inf"), $] >= 5.006001, 'Inf'); ./lln.t:is(!!looks_like_number("Infinity"), $] >= 5.008
{{#tags}}- {{label}}
{{/tags}}