How does Perl count the number of whitespaces in a file?
bigfoot_80906
0
Newbie Poster
Recommended Answers
Jump to PostI don't understand exactly what you mean. I can tell you that spaces, tabs, and newline characters qualify as white spaces..... if you would like sample code, that tells you how to count the number of white spaces.... then that's a different story.
Jump to PostHere is some code for you to count the number of "white spaces" in a file at the end of the string... the sub (function) classifies white spaces as space, tab, and newline.... you can modify the source accordingly, should it only be spaces, or only be tabs, or both... …
All 5 Replies
Comatose
290
Taboo Programmer
Team Colleague
bigfoot_80906
0
Newbie Poster
Comatose
290
Taboo Programmer
Team Colleague
Comatose
290
Taboo Programmer
Team Colleague
bigfoot_80906
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.