open my $fh, ">$i.txt" or die "Can't open $i.txt: $!";