for my $line (0..$row_count) { #this arguments are row, column, formula, format, first cell, second cell $xWS5->repeat_formula($line, 6, [...]