Post the code; it's likely that someone here can help if there is a problem with your Perl code.
However:    Are you sure this only occurs when you run your Perl script? If your CPU is getting hot and the machine becomes unresponsive, it is most likely that this is not a Perl issue at all. Rather, you probably have a cooling issue; either a fan has failed, or the heatsink compound between the heatsink and processor has been baked to a crisp (common problems -- could be something else). Good luck!