in reply to How to do a reciprocal matching statement
$RECI is a scalar variable containing a stringwhile($G2A = $RECI ){
The while statement quoted above simply assigns that same string value to $G2A. There is no "break" or "last" statement inside the loop, and nothing to alter the value of $RECI, so if the string is not empty, the while condition will always be true, and you'll be in an infinite loop. (Did you intend to use "==" instead of "="?)
I second the advice given above: if you still have a problem after fixing that inner while loop, show us a little input data and what the output is supposed to look like for that data.
UPDATE: (Sep. 9): I just happened to take another look at the code (having the perltidy version below really helps!), and I realized a couple more things about your handling of input files:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to do a reciprocal matching statement
by ajl412860 (Novice) on Sep 09, 2015 at 19:51 UTC | |
by graff (Chancellor) on Sep 10, 2015 at 00:20 UTC | |
by 1nickt (Canon) on Sep 09, 2015 at 21:46 UTC |