Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 perusing the Monastery: (13)
As of 2014-11-28 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (196 votes), past polls