Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://448614]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2017-09-23 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (273 votes). Check out past polls.

    Notices?