TIP: Click on subject to list as thread! ANSI
echo: perl
to: David Drummond
from: Jasen Betts
date: 2004-09-16 08:12:46
subject: Question

Hello David.

15 Sep 04 21:39, you wrote to PERL experts:

 DD> G'day

 DD> Can anyone suggest a simple one line that determines if a variable
 DD> contains alpha/numeric data, or a straight numeric value?

some sort of regex ?
first you need to define "straight numeric"

does 2.2 qualify ?  how about is 1e5 ? 0xdeadbeef ? 0800 ? 3-1/2 ?

Jasen

--- GoldED+/LNX 1.1.4.7
* Origin: (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.