in reply to Perl crashes linux

If your kernel is locking up, it must be a fault with the kernel itself or (more likely) a device driver; a user-level program should not be able to do it. Though I'm not very familiar with the Tk or IO::Socket Perl libraries, I doubt that either has a device driver; therefore they cannot be the root cause of your kernel locking up.