Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Re: Regexp for alphabetical order match within the string

by tlhf (Scribe)
on Oct 30, 2003 at 19:45 UTC ( #303378=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Regexp for alphabetical order match within the string
in thread Regexp for alphabetical order match within the string

Elegent solution, tho the ords are needless.
sub is_alphabetical { my @c = split //, shift; $c[$_] ge $c[$_-1] or return 0 for 1..$#c; return 1; }

tlhf
(Everyone forgets about ge and le ^_^)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-09-16 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?