Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: selecting columns from a tab-separated-values file

by choroba (Canon)
on Jan 21, 2013 at 23:36 UTC ( #1014522=note: print w/ replies, xml ) Need Help??


in reply to Re: selecting columns from a tab-separated-values file
in thread selecting columns from a tab-separated-values file

Limiting the splice makes it even faster:

sub trySplitSliceLimit { my @capture = (split ' ', $line, 7)[ 0, 2, 5 ]; }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^2: selecting columns from a tab-separated-values file
Download Code
Replies are listed 'Best First'.
Re^3: selecting columns from a tab-separated-values file
by Kenosis (Priest) on Jan 21, 2013 at 23:40 UTC

    Yes--excellent! Will modify my posting to include this option.

Re^3: selecting columns from a tab-separated-values file
by ibm1620 (Scribe) on Jan 24, 2013 at 04:17 UTC
    This turns out to make the biggest difference, far and away. Of course, it depends on what fields are chosen - in particular, where the rightmost one is.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014522]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-07-28 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls