Hit Ctrl+Alt+F2 to go to a virtual console. Log in as root and kill the process that caused the desktop to freeze. That is: type
that will show the processes (programs) currently running. There will be at least one about perl or cpan (I'm not familiar with CPAN so I don't know the exact name of the program). In the first column there is the processe's PID, say 4623 (it may be 4 or 5 digit number). In that case just type
again to see if it has really died. If it is still running type
#kill -9 4623
kill -9 stands for nuuuuuuuuuuuuuke
No process can survive that.
All that providing your keyboard hasn't frozen as well. If it has you will have to log in from a remote computer via ssh or telnet and do the killing.
If that is not an option, ...........................
BTW, linux didn't crash on you, some application did. At most some desktop (kde or gnome or whatever you're using).
In any case, do not reinstall. I'm sure you didn't damage the system beyond repair. I'm sure you didn't damage the system at all. In the world of linux, not every glitch means reinstalling the OS
P.S. Once you kill the desired process, return to desktop by CTRL+ALT+F7