in reply to Is Perl worth it? How does perl deal with programmer folly?
As for the likes of infinite loops perl doesn't deal with them any differently to any other code, so they will run infinitely (and potentially consuming a lot of CPU). A web server however may time out such long running processes after a specified period of time, but this depends on which web server you're running and it's configuration.
Any other 'unpredictable situations' should really be dealt with by the programmer, as it's not the interpreter's job to watch out for programmer short-sitedness. Perl does come with mechanisms for dealing with exceptional behaviour in programs with functions like die() and eval(). There's also the CGI::Carp module which, can handle unexpected program termination in CGI programs with style.
Ultimately though, if you're writing programs with cpu-hogging infinite loops and any other such follies, then the problem lies not in the language but in your skills as a programmer I'm afraid. So your best choice would be to brush up on programming technique and practice (a lot of which can be found within this site, Super Search is your friend).
HTH
broquaint
|
|---|