[JaxPM] FW: Stupid questions ... ?
Bill Jones
bill at fccj.org
Sun Apr 30 11:48:28 CDT 2000
On the jacksonville-pm-list; Jax.PM'er Bill Jones <bill at fccj.org> wrote -
Hi All :]
Let me spring this on you programmers (and NON-Programmers alike :)
Pls forward your thoughts about this; I would be most interested.
Thx! -Sneex- :]
- FCCJ * 501 W State St * Jacksonville, Fl 32202 * 904/632-3089 -
----------
> From: Bill Jones <bill at fccj.org>
> Date: Sun, 30 Apr 2000 12:41:20 -0400
> Subject: Stupid questions ... ?
>
> (Or - Are there ANY stupid questions?!?)
>
> Hi, Would you consider this a stupid question?
>
> Someone asked me:
> "How can I convert Letters to Numbers?"
>
> I said "Why would you want to?"
>
> They said "Can it be done?"
>
> I said: Yes ...
>
> $_ = "This converts Letters 2 Numbers.";
> $_ =~ s/\G(\s*)(\S+\s*)/{
> foreach $chr ((split('',$2))) {
> print $chr . ' is ' . (ord(uc($chr)) - 64) . "\n";
> } }/ge;
> print;
>
> Here is the output:
> T is 20
> h is 8
> i is 9
> s is 19
> is -32
> c is 3
> o is 15
> n is 14
> v is 22
> e is 5
> r is 18
> t is 20
> s is 19
> is -32
> L is 12
> e is 5
> t is 20
> t is 20
> e is 5
> r is 18
> s is 19
> is -32
> 2 is -14
> is -32
> N is 14
> u is 21
> m is 13
> b is 2
> e is 5
> r is 18
> s is 19
> . is -18
>
>
> But, again "Why?"
>
> What do you think about this? I think I am glad I am not alone --
> I cannot think of any good reason to convert letters to numbers...
>
> ???
> -Sneex- :]
> - FCCJ * 501 W State St * Jacksonville, Fl 32202 * 904/632-3089 -
Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...
More information about the Jacksonville-pm
mailing list