|
E-book: Perl One-Liners Explained |
 vote
 |
|
I'm happy to announce my 3rd e-book called "Perl One-Liners Explained."
Perl one-liners are small and awesome Perl programs that fit in a single line of code and they do one thing really well. These things include changing line spacing, numbering lines, doing calculations, converting and substituting text, deleting and printing certain lines, parsing logs, editing files in-place, doing statistics, carrying out system administration tasks, updating a bunch of files at once, and many more.
Here is an example. Suppose you quickly need to generate a random, 8 character password. You can do it quickly with this Perl one-liner:
perl -le 'print map { ("a".."z")[rand 26] } 1..8' Overall, the e-book has 111 pages and it explains 130 unique one-liners. Many of one-liners are presented in several different ways so the total number of one-liners in the book is over 200.
| | |
| |
|
| | read more | mail this link | score:7949 | -pkrumins, February 4, 2012 |
| |
|
More Programming articles... |
|
|