Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Loop through file to create interval tree

by Laurent_R (Monsignor)
on May 23, 2014 at 18:07 UTC ( #1087249=note: print w/ replies, xml ) Need Help??

in reply to Loop through file to create interval tree

Please fix your formatting to make your code readable. Put one opening <code> at the beginning of the code, one closing </code> tag at the end of your code, and no <code> tag in the middle of your comments.

Otherwise, your splitting is very inefficient. You could get your 3 variables in just one operation:

while (my $line=<$fh>){ chomp $line; my ($low, $high, $id) = split /\t/, $line; # ...

Comment on Re: Loop through file to create interval tree
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-11-28 09:15 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (740 votes), past polls