in reply to Counting Characters
Generally the same way it is done in most languages. With the 'length' command.
ex:
#!/usr/bin/perl
$text = "I like Pie";
$textLength = length($text);
print $textLength . "\n";
This returns 10.
Simple as Pie! mmmm, pie.....
The beatings will continue until morale raises.