Wise Monks...

I have an issue, for which i suspect the eval{} at this point. You monks have to clarify. Below is the issue.

I have written a daemon which wakes up every minutes and checks for some job cards(xml files in 500 folders) and if it finds some xml files it moves the name of the card to database.

I have put the db connection in eval statement. What happens is when there is some problem with db connection the script exits without handling the situtation. Even i have handled $@ at this point. But end up with vein.

What my question is, IS it wise to use eval at the db connection point, or anything else there to solve the issue.

Kindly Advice
-Prasanna.K

In reply to eval {} effect on DB Connection by kprasanna_79

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.