$count = "0" while (/(.)/g) { $count++ } print $count
Update: That's what I get for posting nodes after my bedtime. <G> Yes, I knew about "length", but btrott had already posted an answer using that; I decided to see if there was another way. Why? Because. And that's all the explanation I'm going to offer. <G>
In reply to Re: Counting Characters (Ozymandias: Loop method)
by Ozymandias
in thread Counting Characters
by NeverMore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |