in reply to Re: How To Do This Better?
in thread How To Do This Better?
In the spirit of Not Working Very Hard, here's another option to do what you suggest:
(can't believe I forgot about that one)$string = "abc1235ABC"; $number = ($string =~ tr[a-zA-Z][a-zA-Z]); print "I counted $number alphabetical characters.\n"; print "My string is still ->$string<-\n";
|
|---|