G'day hellohello1,
You've commented out the print statement inside the for loop but written the push statement outside (after) that loop.
You made much the same mistake which I pointed out in Re: Split and join a few days ago.
Use the strict and warnings pragmata, heed the messages they give, and fix your code accordingly. The first of those would have alerted to an issue with "push (@data1, $ratio1);".
If you indented your code to refect its logic, you probably could have seen what was wrong purely by inspection.
I also recommend you read and follow the earlier advice given by ++Anonymous Monk in Re: How to store the output from foreach loop into variable/array without printing?.
-- Ken
In reply to Re: How to store the output from foreach loop into variable/array without printing?
by kcott
in thread How to store the output from foreach loop into variable/array without printing?
by hellohello1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |