From: Jarkko Hietaniemi Date: Mon, 20 May 2002 14:46:15 +0000 (+0000) Subject: A bit of self-promotion from David Wheeler :-) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5b6f21045162f5187f396c06212333eaec75130;p=p5sagit%2Fp5-mst-13.2.git A bit of self-promotion from David Wheeler :-) p4raw-id: //depot/perl@16713 --- diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index aeb7c14..5ee6a6f 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -1920,6 +1920,10 @@ Assuming that you don't care about IEEE notations like "NaN" or if (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/) { print "a C float\n" } +Or you could check out the L module on the CPAN, +which exports functions that validate data types using these and other regular +expressions. + If you're on a POSIX system, Perl's supports the C function. Its semantics are somewhat cumbersome, so here's a C wrapper function for more convenient access. This function takes @@ -1943,9 +1947,9 @@ if you just want to say, ``Is this a float?'' sub is_numeric { defined getnum($_[0]) } -Or you could check out the String::Scanf module on CPAN instead. The -POSIX module (part of the standard Perl distribution) provides the -C and C for converting strings to double and longs, +Or you could check out the L module on the CPAN +instead. The POSIX module (part of the standard Perl distribution) provides +the C and C for converting strings to double and longs, respectively. =head2 How do I keep persistent data across program calls?