[Israel.pm] awk equivalent

Gaal Yahas gaal at forum2.org
Mon Mar 22 12:32:44 PST 2004


On Mon, Mar 22, 2004 at 10:16:58PM +0200, Yuval Kogman wrote:
> Something quite similar could be
> 
> perl -ne 'BEGIN { $\ = "\n" } print (split)[2]'

Except that this doesn't compile :)

"If it looks like a function, it is a function"

print (split)[5] ==> (print split)(5) ==> oops

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list