Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Detect presence of numbers 1-9

by projekt21 (Friar)
on Apr 08, 2002 at 08:57 UTC ( [id://157389]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( $scalar =~ /^[12345]+$/ ) {
      print "match";
    } else {
      print "no match";
    }
    
  2. or download this
    if ( $scalar !~ /[^12345]/ ) {
      print "match";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-25 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found