Hi all, I am calculating polynomial values and then pushing those values into an array. For execution I am using this subroutine :
#first parameter gives the polynominal string
#second parameter gives the min-des width
#third parameter gives the short-line length
$polynominal =~ s/W/$curWidth/g ;#replace W with current value of
$polynominal =~ s/L/$curLength/g ;#replace L with current value of
+ min Length
return eval ($polynominal);
And this is I am pushing values to the array.
print ("size ".@CompareValues. "\n");
I am reading all the polynomial equations from the text file and all of them are they stored in hashes. So that means 11 is one equation, 21 is another and so on. I am using the above script for 3 different equations, I am getting output from the last two and undef from the first one which is 11.
Here's the output when I do print dumper (\@CompareValues);
$VAR1 = [
I guess it's easy to do but I have no idea what am I doing wrong here and what's wrong because I am getting values for other equation. I would like to know what's wrong with this code, I'll be glad if some of few could help me.