in reply to Some Help for a Report About Perl
Another distinctive aspect of Perl worthy of mention is its support for one-liners.
I'm not aware of any other language that comes close to the power and convenience of Perl when writing quick one liners from the command line. Even people who switch from Perl to Python still fall back on Perl when writing one liners.
Perl One-liner References
- Peter Krumins one-liners
- Peter Krumins, Famous Perl One-Liners Explained
- Perl One-Liners: 130 Programs That Get Things Done (O'Reilly book by Peteris Krumins)
- Perl Command-Line Options (perl.com article from 2004 by davorg)
- FMTYEWTK About Mass Edits in Perl (perl.com article from 2004 by Geoff Broadwell)
- Perl White Magic - Special Variables and Command Line Switches
- A gentle introduction/tutorial to the perl command line flags.
- What one-liners do people actually use?
- what are some of the most powerful, complex, one-liners?
Some PM one-liner nodes:
- pl – Perl One-Liner Magic Wand: looking for feedback (2022)
- How to use the -T file op as a one-liner (2023)
- How does $. work in one liner?
- search/replace one liners without clobbering
- Process multiple input files using a one-liner
- One-liner only checking the first line of the input file
- one liner append line(s) to matched paragraph
- How to handle metacharacters in input file for Perl one-liner code
- [Solved]: Thoughts on a section for popular one liners
- remember perl one-liners
- What one-liners do people actually use?
- Scriptome and Perl One-Liners
- Favourite One-liners?
- How-To on Perl one-liners
- Escaping characters in one-liners
- [Win32] Escaping quotes in perl one liner
- Perl White Magic - Special Variables and Command Line Switches
- Re: One Liners
- One Liners
- Uncommon* but Useful Perl Command Line Options for One-liners
- Re: The problem with one-liners...
- another benefit of one-liners
- perl one liner for csv file one field
- Re: perl one liner for csv file one field (useless use of cat and other awards References) (Useless use of cat award (e.g. cat with just one argument), plus other dodgy unix shell hacks)
- oneliner to count the number binary digits in this string 1011111
- The IP address I'd like to own -- oneliner
- help declaring variables within perl one-liner
- Stylish Tk clock -- oneliner
- One liner with globs on Windows to parse .srt files
- One-liner to show C struct sizes using Inline
- One-liner to join keys on a two-dimensionnal hash ?
Old Broken Links
- merlyn's first unix review column (from 1995!) (update: broken link)
- mishapeters one liners (update: broken link)
- Harvard one liners (update: broken link)
- oracle blog one-liners (update: broken link)
- YAPC::NA 2008 talk on Perl one liners by Walt Mankowski (update: broken link)
- Cultured Perl: One-liners 101 (update: broken link)
- Cultured Perl: One-liners 102 (update: broken link)
- cog's "Perl White Magic" talk (update: broken link)
- petdance field guide to the Perl command line (update: broken link)
- merlyn sysadmin article (update: broken link)
- Perl One Liners (update: broken link)
- Some TPJ one-liners (update: broken link)
- Perl Limericks (update: broken link)
See Also
Updated: Added extra references. Thanks Realbot.
In Section
Seekers of Perl Wisdom