Help for this page
elsif (/\*{4}stuff\*{4}(.*?)\*{4}endstuff\*{4}/sg; ) { push(@stuff, $_); } }
for (my $i=0; $i < (@filenames); $i++) { should be for my $i (0 ... $#filenames) {