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 initiatives with brief, effective, and reusable code. frequently, the appropriate instrument is the one-liner, a small yet strong software that matches in a single line of code and does something rather well.

In Perl One-Liners, writer and impatient hacker Peteris Krumins takes you thru greater than a hundred compelling one-liners that do every kind of convenient issues, corresponding to manage line spacing, tally column values in a desk, and get an inventory of clients on a process. This cookbook of beneficial, customizable, and enjoyable scripts will also support hone your Perl coding abilities, as Krumins dissects the code to offer you a deeper knowing 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 eliminate spaces
  • Number strains in a file
  • Print strains that fit a selected pattern
  • Check to determine if a bunch is key with a standard expression
  • Convert IP deal with to decimal form
  • Replace one string with another

And many extra! store time and sharpen you coding abilities as you learn how to triumph over these pesky projects in a number of accurately put keystrokes with Perl One-Liners.

Show sample text content

Download sample