Skip to content

learnbyexample/learn_perl_oneliners

Repository files navigation

Perl One-Liners Guide

Example based guide for text processing with Perl from the command line. Visit https://youtu.be/_7tP_4T45Ok for a short video about the book.

Perl One-Liners Guide ebook cover image

The book also includes exercises to test your understanding, which are presented together as a single file in this repo — Exercises.md.

For solutions to the exercises, see Exercise_solutions.md.

See Version_changes.md to keep track of changes made to the book.


E-book

For a preview of the book, see sample chapters.

The book can also be viewed as a single markdown file in this repo. See my blogpost on generating pdfs from markdown using pandoc if you are interested in the ebook creation process.

For the web version of the book, visit https://learnbyexample.github.io/learn_perl_oneliners/


Testimonials

This is fantastic! 👏 I use Perl one-liners for record and text processing a lot and this will be definitely something I will keep coming back to - I’ve already learned a trick from “Context Matching” (9) 🙂

feedback on [email protected]


Feedback

⚠️ ⚠️ Please DO NOT submit pull requests. Main reason being any modification requires changes in multiple places.

I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.

You can reach me via:


Table of Contents

  1. Preface
  2. One-liner introduction
  3. Line processing
  4. In-place file editing
  5. Field separators
  6. Record separators
  7. Using modules
  8. Multiple file input
  9. Processing multiple records
  10. Two file processing
  11. Dealing with duplicates
  12. Perl rename command

Acknowledgements

A heartfelt thanks to all my readers. Your valuable support has significantly eased my financial concerns and allows me to continue working on programming ebooks.


License

The book is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

The code snippets are licensed under MIT, see LICENSE file.