The main thing to look at is perlrun, which will describe the command-line options to perl - understanding what options are available, and how they interact with each other, is crucial to writing and understanding one-liners.
Beyond that, it is just perl. One-liners tend to take shortcuts that make the perl less obvious to someone more used to application code - no strictures, heavy use of special variables (perlvar) and nasty tricks that would be more trouble than they're worth in a production/maintenance environment.
Another important aspect to grok is the Unix philosophy beyond perl - lots of tools that do (mostly) simple things and work well together. For example, this is an invocation I use remarkably often:
find . -type f | xargs perl -wle '... some code ...'
The power of perl knowledge is that you can add to this set - look out for things that you do regularly, and try to write tools to add to the set to reduce the amount of typing and, more importantly, thinking required to do your day to day tasks. And when you write such tools, treat them as applications rather than one-liners - perl is all about having the kitchen sink as well.
Taking it out of context, this article includes some short examples of the sort of utilities I'm talking about. But there's no reason your utilities need to be short - one of my most often used self-written utilities is 818 lines (including POD) and supports 19 distinct command-line options in around 25920 combinations.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||