[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Hi there



Hi there

Could anyone help me out here, I need to replace letters [a-zA-Z] with
numbers, as in a=1, b=2 etc. and I have no idea how to accomplish this
without writing if clauses for every letter of the alphabet...uhm, does
anyone know of a better, faster way to do this...perhaps a onelines?  =)

Also, I'm trying to split a long text into pairs of letters, and I have
absolutely NO idea how to do this...I'm trying to make strings like
"John is fat" turn into scalar values in an array that are "Jo", "hn",
"is", "fa" "t and so on.  I need pairs of digits, that's it...and as
much as I've pondered, I'm unable to find a solution.  And...one more
thing, can you match odd and even numbers in Perl?

I know these are slimy, horrible newbie questions, but still...they've
been really getting to me and I'd really appreciate some help.  Thanks!

Sincerely

Sveinbjorn Thordarson
Reykjavik, Iceland

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org