Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 a soft breeze sighs...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2016-12-05 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (71 votes). Check out past polls.