in reply to Challenge - Creative Way To Detect Alpha Characters

This link will describe to you how to switch between ASCII characters and their corresponding numerical value.

Perl Cookbook Recipe 1.4. Converting Between ASCII Characters and Values

You can then step through the unpack'd string with a foreach loop to compare that numerical value with the values for alphabetic characters, A-Z(65-90) and a-z(97-122).
amt

Steve_p - Removed link to copyrighted material

  • Comment on Re: Challenge - Creative Way To Detect Alpha Characters

Replies are listed 'Best First'.
Re^2: Challenge - Creative Way To Detect Alpha Characters
by Limbic~Region (Chancellor) on Sep 13, 2004 at 17:49 UTC
    amt,
    You can then step through the...

    That was one of the solutions I came up with (walking the string). I don't see it as being a very creative solution in the sense that uc eq lc is. I was thinking some bitwise operation or something else unique.

    Cheers - L~R