http://www.perlmonks.org?node_id=448567


in reply to Re: cut vs split (suggestions)
in thread cut vs split (suggestions)

Here are the numbers on my machine (first line describes the input used):

% perl -le 'BEGIN{$,=","} print map int rand 1000, 1..25 for 1..500_00 +0' \ > numbers.csv % time cut -d, -f"1-15" numbers.csv > /dev/null 0.80s user 0.05s system 98% cpu 0.859 total % time perl -lanF, -e 'print join ",", @F[0..14];' numbers.csv > /dev/ +null 31.54s user 0.06s system 97% cpu 32.462 total % time perl -lanF, -e 'BEGIN{ $,=","} print @F[0..14];' numbers.csv > +/dev/null 31.14s user 0.05s system 99% cpu 31.463 total
(I guess I have much faster cut than sk's...)

the lowliest monk