Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Integer Type Checking

by simeon2000 (Monk)
on Jul 19, 2002 at 17:26 UTC ( #183325=note: print w/replies, xml ) Need Help??


in reply to Integer Type Checking

Perl doesn't differentiate, AFAIK, between strings and integers as far as the programmer is concerned.

One way to tell if it's an integer would be:

print "Integer!" if $VAR =~ /^\d+$/;.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2023-03-21 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?