How to generate a series study table documents using script

Dear all,
       I want to obtain a series study table documents and these std documents are named as r1_0.std, r1_1.std, r1_2.std, r1_3.std,.......,r1_86.std. How can I write the sentences in the script? I tried to write the following simple sentences but no use. I really appreciate any help. Thank you.
 for (my \$i=0, \$i<87, ++\$i)  {
my \$std1 = Documents->New("\$i r1.std");
}