Perl One-Liners: 130 Programs That Get Things Done

Perl One-Liners: 130 Programs That Get Things Done

Peteris Krumins


Part of the joys of programming in Perl lies in tackling tedious projects with brief, effective, and reusable code. usually, the proper software is the one-liner, a small yet strong application that matches in a single line of code and does something particularly well.

In Perl One-Liners, writer and impatient hacker Peteris Krumins takes you thru greater than a hundred compelling one-liners that do all types of convenient issues, comparable to manage line spacing, tally column values in a desk, and get a listing of clients on a process. This cookbook of precious, customizable, and enjoyable scripts may even support hone your Perl coding abilities, as Krumins dissects the code to provide you a deeper realizing of the language.

You'll locate one-liners that:

  • Encode, decode, and convert strings
  • Generate random passwords
  • Calculate sums, factorials, and the mathematical constants π and e
  • Add or get rid of spaces
  • Number strains in a file
  • Print strains that fit a particular pattern
  • Check to determine if a bunch is key with a typical expression
  • Convert IP handle to decimal form
  • Replace one string with another

And many extra! store time and sharpen you coding abilities as you discover ways to overcome these pesky projects in a number of accurately positioned keystrokes with Perl One-Liners.

Show sample text content

Download sample