in reply to Defining Arrays
It seems a bit awkward but it give's you the right result. Please notice that I didn't loop from 1.5 to 9.4 with a stepping of .1 for that would get imprecise (I got with a quick perl -e test 5.99999999999999 instead of 6). You can't go precisely if you are calculating with floats.my @results; for (my $i=0; $i <= 79; $i++) { push @results, ($i/10+1.5); }
|
|---|