Skip to content

A simple Perl program that count words, characters, and lines from any text file.

License

Notifications You must be signed in to change notification settings

scottgriv/perl-word_counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perl Badge
GitHub Badge Email Badge BuyMeACoffee Badge
Bronze


Perl Word Counter

A simple Perl program that count words, characters, and lines from any .txt file.


Table of Contents

What is Perl?

Perl is a high-level, general-purpose, interpreted, dynamic programming language. It was originally developed by Larry Wall in 1987 as a scripting language to make report processing easier. Perl is known for its powerful text processing capabilities and its eclectic syntax, which supports multiple programming paradigms including procedural, object-oriented, and functional programming. Perl is widely used for system administration, web development, network programming, and more.

Getting Started

To run the word_count.pl script, follow these steps:

  1. Open a terminal on your machine.
  2. Navigate to the directory containing the word_count.pl file.
  3. Run the script using Perl with the command: perl word_count.pl <filename>
  4. Replace <filename> with the name of the file you want to analyze.
    • To use the example file included with this repo, run: perl word_count.pl count_me.txt
    • You will get the following output:
Words: 18
Characters: 95
Lines: 2

For:

This is a total of 18 words with 95 characters (yes blank spaces count)
spanning across 2 lines

Resources


Perl Book

Note

This README provides a brief introduction to Perl, guidance on how to run the script, and links to more comprehensive Perl resources for further reading and learning.

License

This project is released under the terms of The Unlicense, which allows you to use, modify, and distribute the code as you see fit.

  • The Unlicense removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
  • For more details, see the LICENSE file in this repository.

Credits

Author: Scott Grivner
Email: scott.grivner@gmail.com
Website: scottgrivner.dev
Reference: Main Branch


About

A simple Perl program that count words, characters, and lines from any text file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages