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

Re: Better method to cut columns from delimited file

by Tux (Abbot)
on May 10, 2012 at 13:37 UTC ( #969810=note: print w/ replies, xml ) Need Help??

in reply to Better method to cut columns from delimited file

Spreadsheet::Read comes with xlscat, which can filter rows and/or columns from CSV, XLS and other spreadsheet like formats:

$ cat test.csv NAME|AGE|CITY|ZIP AAA|23|STAT|60001 BBB|34|PPOR|12345 CCC|11|TRET|2345 $ xlscat --in-sep-char=\| -C1,3 test.csv NAME|CITY AAA|STAT BBB|PPOR CCC|TRET $

For CSV-like formatted files, it uses Text::CSV_XS.

Enjoy, Have FUN! H.Merijn

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-07-26 20:42 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (240 votes). Check out past polls.