|Ten perl one-liner tips and tricks...|
The core of any perl one-liner is the -e switch, which lets you pass a snippet of code on the command-line:
perl -e 'print "hi\n"' prints "hi" to the console.
The second standard trick to perl one-liners are the -n and -p flags. Both of these make perl put an implicit loop around your program, running it once for each line of input, with the line in the $_ variable. -p also adds an implicit print at the end of each iteration.