open PS, "<${psfile}.ps";
open OUT, ">${psfile}.prolog";
while( <PS> )
{
/^%%Page:/ && do {
close OUT;
($pagenum) = m/(d+)$/;
open OUT, ">${psfile}.$pagenum";
print OUT;
next;
};
/^%%Trailer/ && do {
close OUT;
($pagenum) = m/(d+)$/;
open OUT, ">${psfile}.trailer";
open OUT, ">${psfile}.trailer";
print OUT;
next;
};
print OUT;
}
close OUT;
close PS;
===Cut===
Nick.
--------------------------------------------------------------------------
Nikolaj Logvinov Deputy head of software development department
nl@unibest.ru JSCB "Unibest" Moscow