Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: number regex (incl sci notation)

by rrwo (Friar)
on Dec 07, 2004 at 20:21 UTC ( [id://412992]=note: print w/replies, xml ) Need Help??


in reply to Re: number regex (incl sci notation)
in thread number regex (incl sci notation)

Scalar::Util's looks_line_number() routine checks the Perl API Looks Like Number field in the scalar.

In some cases your variable might have a string which is a valid number, but doesn't have that field set.

Replies are listed 'Best First'.
Re^3: number regex (incl sci notation) ("looks" not has IV)
by tye (Sage) on Dec 08, 2004 at 06:24 UTC

    There is no "looks like a number field" in a scalar. looks_like_number() checks whether a *string* *looks like a number*. This is independent of whether the scalar has an IV stored in it (which appears to be what you are thinking of).

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412992]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2025-01-18 14:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (56 votes). Check out past polls.