Holy shit, you need some help with your programming I think

You wasted a lot of time on that one. Watch this instead:
foreach my $num ( 1 .. 227 ) {
my $bodylink = "$pathof/search$num.pl";
my $body = `$bodylink`;
open(PAGE,">$pathoff/search$num.html") or die "blah";
print PAGE "$html $body $htmlll\n";
close(PAGE);
}
This will handle all 227 of them in just a few lines.
note replace haha123 with a left curly bracket.
