good chemistry is complicated,and a little bit messy -LW PerlMonks

### Re^6: problem in for loop

by MVRS (Acolyte)
 on May 16, 2013 at 08:31 UTC ( #1033788=note: print w/replies, xml ) Need Help??

in reply to Re^5: problem in for loop
in thread problem in for loop

threshold=1000

Input

link1 myco1 16 13013 color=chr1

link1 myco2 7419028 7432025 color=chr1

link2 myco1 13016 31245 color=chr1

link2 myco2 7432026 7450255 color=chr1

link3 myco1 31569 50386 color=chr1

link3 myco2 7450876 7469693 color=chr1

link4 myco1 53241 82019 color=chr1

link4 myco2 7472518 7501295 color=chr1

link5 myco1 82667 85039 color=chr1

link5 myco2 7511397 7513769 color=chr1

link6 myco1 85052 162535 color=chr1

link6 myco2 7513770 7591243 color=chr1

output

link1 myco1 16 13016

link1 myco2 7419028 7450255

link2 myco1 13016 31569

link2 myco2 7432026 7469693

link3 myco1 31569 53241

link3 myco2 7450876 7501295

link4 myco1 53241 82667

link4 myco2 7472518 7513769

link5 myco1 82667 85052

link5 myco2 7511397 7591243

link6 myco1 85052 3519888

link6 myco2 7513770 6200895

Replies are listed 'Best First'.
Re^7: problem in for loop
by hdb (Monsignor) on May 16, 2013 at 08:48 UTC

So you want

if (y-a)&&(z-c)< threshold print as following link1 x a # not b as you stated above? link1 w d

Then my next proposal is

However, this gives wrong results for link6 but I do not understand your example as the threshold condition seems not to be met??

Create A New User
Node Status?
node history
Node Type: note [id://1033788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2018-08-21 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Asked to put a square peg in a round hole, I would:

Results (204 votes). Check out past polls.

Notices?