|more useful options|
What is the difference?by YAFZ (Pilgrim)
|on Apr 08, 2003 at 14:20 UTC||Need Help??|
YAFZ has asked for the wisdom of the Perl Monks concerning the following question:
I have 2 small Perl programs which are intended to calculate the same thing, namely the character count in a text file. By character, I mean, any character except blank space and/or tabs.
The first version is something like that:
And the second version is like that:
I use ccount.pl like that:
And I use ccount2.pl like that:
As you see, ccount.pl combined with wc command tells me that the text file consists of 69 while the ccount2.pl by itself is reporting the same file has 72 characters.
Why do I get different number of characters?