How can I print only certain fields in a space separated file?

Posted by Daziplqa on Stack Overflow See other posts from Stack Overflow or by Daziplqa
Published on 2010-03-19T16:59:26Z Indexed on 2010/03/19 17:41 UTC
Read the original article Hit count: 172

Filed under:
|
|

I have a file containing the following content 1000 line in the following format:

abc def ghi gkl

How can I write a Perl script to print only the first and the third fields?

abc ghi

© Stack Overflow or respective owner

Related posts about perl

Related posts about split