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