Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: cut vs split (suggestions)

by demerphq (Chancellor)
on Apr 17, 2005 at 10:25 UTC ( #448614=note: print w/ replies, xml ) Need Help??


in reply to cut vs split (suggestions)

I think you could speed up the perl code somewhat by not using the autosplit function.

perl -lne 'print join ",", (split /,/,$_,16)[0..14];' numbers.csv

Should be slightly faster as it need not split the additional 10 fields out before rejoining.

---
demerphq


Comment on Re: cut vs split (suggestions)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-01 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (8 votes), past polls