Librenix  
(Show all Perl articles . . .
)  
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Perl tips

Up
vote
Down

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.
 read more | mail this link | score:8205 | -Ray, June 1, 2010
More Programming articles...

Abstract Art on Acrylic Panels

Selected articles

VPS: Xen vs. OpenVZ

Space Tyrant: A threaded game server project in C

Missing the point of the Mac Mini

The Network Computer: An opportunity for Linux

Why software sucks

Why Programmers are not Software Engineers

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin