Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Check for Positive Integer entry only

by swampyankee (Parson)
on May 09, 2007 at 18:08 UTC ( [id://614465]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl
    
    ...
    + 1234
    
  2. or download this
    return $_[0] =~ /^\s*[\+\-]?\d+\s*$/;
    
  3. or download this
     if(( $_[0] =~ /^\s*[\+\-]?\d+\s*$/) and ($_[0] > 0)) {
        return 1;
    ...
      else{
        return undef;
      }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found