Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Efficient way to sum columns in a file

by sk (Curate)
on Apr 13, 2005 at 18:12 UTC ( #447544=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [sk]% time cut -d, -f"1-15" numbers.csv > out.csv
    5.670u 0.340s 0:06.27 95.8% 
    
  2. or download this
    [sk]% time perl -lanF, -e 'print join ",", @F[0..14];' numbers.csv > o
    +ut.csv
    31.950u 0.200s 0:32.26 99.6%
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://447544]
help
Chatterbox?
[choroba]: Yeah, let's ban dot in INC, but add glob to it!
[Corion]: choroba: Well, at least the above is user-defined, not implicitly by Perl ;)
LanX globalization is evil! Lets Perlxit!
[stevieb]: "Yeah, let's ban dot in INC, but add glob to it!" LOL!!!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2017-01-19 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.