Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: perl one liner for csv file one field

by Tux (Canon)
on Jan 17, 2015 at 19:16 UTC ( [id://1113609]=note: print w/replies, xml ) Need Help??


in reply to perl one liner for csv file one field

Your case inspired my to add a filter option to Text::CSV_XS's csv function:

$ perl -MCSV -e'csv(in=>"test.csv",filter=>{11=>sub{length>6}})' D,642,0642,UBF,EVL,,M,,S,S,FOREVER,213,213, D,642,0642,UBF,EVL,,M,,S,S,QSP-U=C,4,4, $

It still needs some shaving, tests and docs, but looks promising and useful. It'll be included in the next release.


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found