in reply to To regex or not to regex

Algorithmically golfed: (golfed without employing space-saving techniques, otherwise it would look scary :P)

open (OLD, "<$old_file.txt") || die $!; my $i; foreach (split (/====\s*\n(?=\d+)/, do{local$/;<OLD>})) { open (NEW,">$old_file$i.txt") || die $!; print NEW $_; close (NEW); $i++; }