Setting $/ = '<?split ?>'; will allow you to read the the file in chunks. Then it's a case of deciding what the filename should be, opening it and writing it out.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
Comment on Re: Splitting XML file on Processing Instructions