Perl is a rather lenient language when it comes to the mixing of types (recently explored here). So unless your dealing with really big/small numbers, then there shouldn't be much of a problem.

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


In reply to Re: Is Perl worth it? by broquaint
in thread Is Perl worth it? How does perl deal with programmer folly? by jotti

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.