Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Loop through file to create interval tree

by Laurent_R (Parson)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-09-23 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (219 votes), past polls