added perl stat function to procstart.pl