Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Challenge - Creative Way To Detect Alpha Characters

by johndageek (Hermit)
on Sep 14, 2004 at 14:51 UTC ( [id://390859]=note: print w/replies, xml ) Need Help??


in reply to Challenge - Creative Way To Detect Alpha Characters

Just for fun.
perl -le '@t=split(/[A-Z]|[a-z]/,"1gGiI234");print "$#t\n";'

Silly question, doesn't uc/lc "walk the string" in the background?

Enjoy!
Dageek

Replies are listed 'Best First'.
Re^2: Challenge - Creative Way To Detect Alpha Characters
by Limbic~Region (Chancellor) on Sep 14, 2004 at 15:54 UTC
    johndageek,
    Because it has just been for fun, I haven't been too strict on the loose set of rules, but split takes a regular expression as the first argument - which isn't allowed. To answer your question, the string has to be walked in some fashion to change case though special care has to be taken if we aren't talking about plain jane ASCII.

    Cheers - L~R

Log In?
Username:
Password:

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

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

    No recent polls found