in reply to Re^3: (weird dup - please reap) Parsing and Obtaining Values from output
in thread Parsing and Obtaining Values from output

Hi

note: the following is not intended to be a fix to your program; instead I try to show you a few steps you could have done to identify faulty/suspicious parts of your program...

First, you have not followed the golden rule to

use strict; use warnings;
Then you would have found out some obvious mistakes like
for (@myarray1) { last if $conf eq $_; $i++; };
Secondly, you use debug-output, which is fine ... however it is not detailed enough; e.g.
print "Values is @values \n";
Here you can't easily see that the array @values might not contain what you want (but many empty elements addtionally). This leads to many unitialized values in the further run of your program. You could use something like print join("XXX\n", @values);

If you look at your debug-output to more detail, you would see that the first (non-empty) element of @values is

0|0|{A=145,B=2,C=12,D=18}|!
and
Conf is 0 Rest is 0
... so your split is not working as expected ...

When debugging code, you should start from the beginning. Solve the points shown above. And only when you found a solution for those, continue by looking at the rest of the program. It will be much easier that way.

HTH, Rata