in reply to Not a Number
Chapter 2 of the Perl Cookbook provides numerous recipes for dealing with numbers in Perl. It comes highly recommended.use strict; my $number="3.141529"; print "$number is a C float!\n" if $number=~/^([+-]?)(?=\d|\.\d)\d*(\. +\d*)?([Ee]([+-]?\d+))?$/;
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Not a Number
by rasta (Hermit) on Oct 18, 2002 at 07:45 UTC | |
by physgreg (Scribe) on Oct 18, 2002 at 13:42 UTC |