open(DIST,"path/DBins.pl") or die "$!";
while(my $lines = <DIST>){
chomp($lines);
my @point = (split (/\s+/, $lines))[1,2];
I have to compare the value of $distance (shown above)with the above file with the second column and print out the corresponding first column value. the threshold value is 71(1st column). Any value of $distance above 50.00 should stop there and retrieve the first column values of 50.23. The first column is the index value and second column(floating point values) is the energy values.
Till now I have split the line in the file, but i dnt know how to assign values to that array to the two columns . I dont know how to compare the value of $distance to the second column and get the corresponding first column values as output.
Please help.
yes Kevin, I had posted to another forum, as I tried to solve it and i am stuck, i am still learning perl and i was stuck upto splitting the array, not knowing how to assign values to that. I know the algorithm, but i find it very difficult to write the syntax.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.