Perl One-Liners: 130 Programs That Get Things Done (Paperback)

Peteris Krumins

  • 出版商: No Starch Press
  • 出版日期: 2013-11-26
  • 售價: $1,300
  • 貴賓價: 9.5$1,235
  • 語言: 英文
  • 頁數: 168
  • 裝訂: Paperback
  • ISBN: 159327520X
  • ISBN-13: 9781593275204
  • 相關分類: Perl 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Part of the fun of programming in Perl lies in tackling tedious tasks with short, efficient, and reusable code. Often, the perfect tool is the one-liner, a small but powerful program that fits in one line of code and does one thing really well.

In Perl One-Liners, author and impatient hacker Peteris Krumins takes you through more than 100 compelling one-liners that do all sorts of handy things, such as manipulate line spacing, tally column values in a table, and get a list of users on a system. This cookbook of useful, customizable, and fun scripts will even help hone your Perl coding skills, as Krumins dissects the code to give you a deeper understanding of the language.

You'll find one-liners that:

  • Encode, decode, and convert strings
  • Generate random passwords
  • Calculate sums, factorials, and the mathematical constants π and e
  • Add or remove spaces
  • Number lines in a file
  • Print lines that match a specific pattern
  • Check to see if a number is prime with a regular expression
  • Convert IP address to decimal form
  • Replace one string with another
And many more! Save time and sharpen you coding skills as you learn to conquer those pesky tasks in a few precisely placed keystrokes with Perl One-Liners.

商品描述(中文翻譯)

Perl一行程式的樂趣之一在於使用簡短、高效且可重複使用的程式碼來處理繁瑣的任務。通常,完美的工具就是一行程式,它是一個小而強大的程式,只需要一行程式碼就能很好地完成一件事情。

在《Perl一行程式》這本書中,作者兼急於求成的黑客Peteris Krumins帶領讀者探索了100多個引人入勝的一行程式,這些程式可以執行各種方便的任務,例如調整行間距、計算表格中的列值總和以及獲取系統上的使用者列表。這本有用、可自定義且有趣的腳本食譜甚至可以幫助您提升Perl編程技能,因為Krumins會解析程式碼,讓您對語言有更深入的理解。

這本書中包含了以下一行程式的範例:
- 編碼、解碼和轉換字串
- 生成隨機密碼
- 計算總和、階乘以及數學常數π和e
- 添加或刪除空格
- 為文件中的行編號
- 印出符合特定模式的行
- 使用正則表達式檢查數字是否為質數
- 將IP地址轉換為十進制形式
- 替換一個字串為另一個字串

還有更多!通過學習如何在幾個精確的按鍵位置上征服這些煩人的任務,您可以節省時間並提升編程技能。讓《Perl一行程式》幫助您達到這些目標。