Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Need to match number other than 1

by olus (Curate)
on Nov 29, 2007 at 14:09 UTC ( [id://653842]=note: print w/replies, xml ) Need Help??


in reply to Need to match number other than 1

Reading it as having a sequence of 4 or 5 digits, as in '12345', and allowing sequences that do not have the '1', then simply:

my $sequence = '12345'; if( index($sequence, '1') >= 0 ) { # found the 1 digit. Interrupt here. }

--
olus

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found