I am pleased to announce a new version of my Perl One-Liners Guide ebook. Examples, exercises, solutions, descriptions and external links were added/updated/corrected.
When it comes to command line text processing, there are several well known tools like
grep for filtering,
sed for substitution and
awk for field processing. Compared to such tools, Perl has a feature rich regular expression engine, plenty of builtin modules and a thriving ecosystem. Another advantage is that Perl is more portable.
This ebook will show examples for filtering and substitution features, field processing, using standard and third-party modules, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on.
To celebrate the new release, you can download PDF/EPUB versions of Perl One-Liners Guide for FREE till 07-October-2023. You can still pay if you wish ;)
All Books Bundle is just $12 (normal price $32), includes all my 13 programming ebooks.
- Command version updated to Perl 5.38.0
-gslurps entire file contents
- Many more exercises added
- Long sections split into smaller ones
- In general, many of the examples, exercises, solutions, descriptions and external links were updated/corrected
- Updated Acknowledgements section
- Code snippets related to info/warning sections will now appear as a single block
- Book title changed to Perl One-Liners Guide
- New cover image
On this blog, I post tips covering Python, command line tools and Vim. Here are video demos for these tips:
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) 🙂
Table of Contents🔗
- One-liner introduction
- Line processing
- In-place file editing
- Field separators
- Record separators
- Using modules
- Multiple file input
- Processing multiple records
- Two file processing
- Dealing with duplicates
- Perl rename command
You can also read the book online here: https://learnbyexample.github.io/learn_perl_oneliners/.
Visit https://github.com/learnbyexample/learn_perl_oneliners for markdown source, example files, exercise solutions, sample chapters and other details related to the book.
See also my blog post on how to customize
pandocfor generating beautiful PDF/EPUB versions from GitHub style markdown.
Subscribe to learnbyexample weekly — free newsletter covering programming resources, updates on what I am creating, tips, tools, free ebooks and more, delivered every Friday.
Feedback and Errata🔗
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, Gumroad rating, 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:
- Issue Manager: https://github.com/learnbyexample/learn_perl_oneliners/issues
echo 'bGVhcm5ieWV4YW1wbGUubmV0QGdtYWlsLmNvbQo=' | base64 --decode
- Twitter: https://twitter.com/learn_byexample
Happy learning :)