http://qs321.pair.com?node_id=206235


in reply to Not a Number

You use regexes to check whether something is a valid number. The advantage of this is that you can easily adapt the regexes to whatever your interpretation of a number is. Here's an example out of the Cookbook:
use strict; my $number="3.141529"; print "$number is a C float!\n" if $number=~/^([+-]?)(?=\d|\.\d)\d*(\. +\d*)?([Ee]([+-]?\d+))?$/;
Chapter 2 of the Perl Cookbook provides numerous recipes for dealing with numbers in Perl. It comes highly recommended.

CU
Robartes-