Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl one liner print columns 2.. last

by mhearse (Hermit)
on Jan 04, 2013 at 19:37 UTC ( #1011709=note: print w/ replies, xml ) Need Help??


in reply to perl one liner print columns 2.. last

awk does such things well. Uses \s+ delimiter by default.

cat file | awk '{ print ( $2, $(NF-1) ) }'


Comment on Re: perl one liner print columns 2.. last
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-07-13 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (247 votes), past polls